How to remove images from Cloudinary by Node.js Express? How to remove images from Cloudinary by Node.js Express? mongoose mongoose

How to remove images from Cloudinary by Node.js Express?


There are two options to delete an image from cloudinary:

  1. By using the admin API. For example in Node:

cloudinary.v2.api.delete_resources(['image1', 'image2'], function(error, result){console.log(result);});

  1. Using our upload API:

cloudinary.v2.uploader.destroy('sample', function(error,result) { console.log(result, error) });

Please note that using our admin API is rate limited and you might want to use the second option.