Image & Video APIs

How can I get the size or dimensions of an asset by its public ID?

Last updated: Feb-12-2026

Get asset dimensions via API

Upload response includes dimensions

When uploading using the upload endpoint of the Upload API, every upload call automatically returns a JSON response with the file's details including the bytes, width, and height parameters.

Example: Image upload response:

Example: Video upload response:

See also: Upload endpoint

Query assets via Admin API

You can also use the Admin API endpoints to get details of a single resource.

For example, in Ruby:

Note
Unlike Upload API calls, Admin API calls are rate-limited.

See also: Get details of a single resource

Return metadata in a client-side request using the 'getinfo' flag

You can return dimensions and other metadata about both the input asset and the transformed output asset in a JSON format as a client-side request by using the getinfo flag parameter (fl_getinfo in URLs).

The example below shows what's returned for an image transformation that includes g_auto.

Learn more about all the getinfo options: getinfo flag

View asset dimensions in the Media Library

Media Library's asset preview tab

  1. Go to the Media Library and search for the asset.
  2. Select the asset and click the previous icon (eye) in the upper-right hand corner of the Media Library and under the assets toolbar.

    Preview pan

  3. View the asset dimensions in the Summary tab of the Preview Pane.

    preview-pane.png

Drill down into the manage page

  1. Go to the Media Library and search for the asset.
  2. Double-click the asset. The Manage page opens.
  3. In the Manage page, select the Summary tab to view the asset dimensions.

    Manage page

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars