0

I tried to fetch the list of images in cloudinary with the help of API. I'm getting the image details other than exif(image_metadata). Help me to fetch the exif(image_metadata).

The below is the code which I used to fetch the details:

 try {
    let result = cloudinary.v2.api.resources({ image_metadata: true }, 
function(
      error,
      result
    ) {
      console.log("result", result);
      if (result) {
        successCB(result);
      }
    });
  } catch (err) {
    failureCB(err);
  }
Nivi sri
  • 133
  • 1
  • 1
  • 9

1 Answers1

0

There isn't a method that will return only the metadata. You will need to parse this on your own end.

You can retrieve the image metadata by using the image_metadata parameter when uploading when using the explicit method. For example,

cloudinary.v2.uploader.explicit("sample",{type: "upload", image_metadata:true}, function(err, res){console.log(err, res); })
Matt Greene
  • 424
  • 2
  • 3
  • I can fetch the value for the image whose public_id includes sample. But I can't fetch for all the images by providing like this cloudinary.v2.uploader.explicit( { type: "upload", image_metadata: true }, function(error, result) { console.log("result", result); if (result) { successCB(result); } } – Nivi sri Aug 20 '18 at 16:38