How to get Embedded Metadata (EXIF) from an image?

wildly_unhappy Member Posts: 2
edited November 21 in Developer APIs

I want to get all image from a folder using:

const photoList = await cloudinary.v2.api.resources(
      type: "upload",
      prefix: "<FOLDER_NAME>",
      metadata: true,
    function (error, result) {
      console.log(result, error);

I can see the EXIF data from my images in the DAM and I need the DateTimeOriginal from the image's metadata in the response for sorting purposes.

The only thing I find about this topic, is an article from 2012 about EXIF data which says

**Update March 2017: The exif parameter has been deprecated. The exif data can now be extracted using the image_metadata parameter.

So I went ahead and used image_metadata: true in the code above. But this doesn't change anything in the response. The article is quite misleading with this statement.

Is there any way to still get the EXIF data (or in my case at least that specific piece of DateTimeOriginal ) of an image?

TIA, Best wishes, Fabian


  • Tom
    Tom Member, Cloudinary Staff Posts: 36

    Hi @wildly_unhappy,

    Thanks for reaching out. 

    Unfortunately, the resources API does not support media_metadata (formerly `image_metadata`) parameter per

    You will need to use resource by public ID API ( by specifying `media_metadata: true` and you will see EXIF data in the response.

    However, the above requires making a request per public_id so you can instead use Search API ( by specifying with_field('image_metadata') (media_metadata is not yet supported on Search API) and you should see EXIF data for all the assets in the response.

    Please let me know if you have any other questions or queries.

    Kind Regards,


  • wildly_unhappy
    wildly_unhappy Member Posts: 2

    Hey Thomas,

    these actually give me the data I need. The problem is, the Search API is incredibly unstable with folders/asset_folders. With the resources API, the prefix works perfectly fine, the new API endpoint by_asset_folder works perfectly. But with the Search API I cannot get anything working folder-wise.


    This finds images everywhere but only randomly the one from the actual folder I am searching in.