Via API
- Upload response includes dimensions
- Query assets via Admin API
- Return image metadata in a GET request
Via UI
Via API
Upload response includes dimensions
When uploading using our API, every upload call automatically returns a JSON response with the file's details including the bytes
, width
and height
parameters. Here is an image upload example:
{ public_id: 'sample', version: '1312461204', width: 864, height: 564, format: 'jpg', created_at: '2017-08-10T09:55:32Z', resource_type: 'image', tags: [], bytes: 9597, type: 'upload', etag: 'd1ac0ee70a9a36b14887aca7f7211737', url: 'http://res.cloudinary.com/demo/image/upload/v1312461204/sample.jpg', secure_url: 'https://res.cloudinary.com/demo/image/upload/v1312461204/sample.jpg', signature: 'abcdefgc024acceb1c1baa8dca46717137fa5ae0c3', original_filename: 'sample' }
Similarly, a video upload response has the following:
{ "public_id": "ygzxwxmflekucvqcrb8c", "version": 1427018743, "signature": "4618ba7c3461b6531cb9d2f16b06ce672af793b6", "width": 854, "height": 480, "format": "mp4", "resource_type": "video", "created_at": "2017-03-22T10:05:43Z", "tags": [ ], "bytes": 9094354, "type": "upload", "etag": "7e3977ca45a2c2a063e4f29fa3ecdfdd", "url": "http://res.cloudinary.com/demo/video/upload/v1427018743/ygzxwxmflekucvqcrb8c.mp4", "secure_url": "https://res.cloudinary.com/demo/video/upload/v1427018743/ygzxwxmflekucvqcrb8c.mp4", "audio": { "codec": "aac", "bit_rate": "246679", "frequency": 48000, "channels": 2, "channel_layout": "stereo" }, "video": { "pix_format": "yuv420p", "codec": "h264", "level": 31, "bit_rate": "5170819" }, "frame_rate": 29.97002997002997, "bit_rate": 5424041, "duration": 13.4134 }
Query assets via Admin API
You can also use our Admin API to list the details of an already uploaded image. For example in Ruby:
Cloudinary::Api.resource('sample')
Note that Admin API calls (only) are rate-limited.
For more information:
http://cloudinary.com/documentation/admin_api#details_of_a_single_resource
Return image metadata in a GET request
Returns metadata of both the input asset and the transformed output asset in a JSON format by using the flag parameter and setting it to getinfo
(fl_getinfo
in URLs).
https://res.cloudinary.com/demo/image/upload/ar_0.7,c_fill,g_auto:subject,w_750/fl_getinfo/boat_lake2.jpg // Returns {"input":{"width":1920,"height":1280,"bytes":1213497},"landmarks":[[]],"g_auto_info":[{"x":25,"y":0,"width":893,"height":1279}],"resize":[{"x":23,"y":0,"width":896,"height":1280},{"x_factor":0.8370535714285714,"y_factor":0.8370535714285714}],"output":{"format":"jpg","bytes":308948,"width":750,"height":1071}}
More information can be found here.
Via UI
Media Library's asset preview tab
- Go to the Media Library and search for the asset
- Single-click on the asset and select the previous icon (eye) in the upper-right hand corner of the Media Library and right underneath the console navbar.
Drill down into the manage page
- Go to the Media Library and search for the asset
- Double-click on the asset and it will move you to the manage page
Comments
0 comments
Please sign in to leave a comment.