How to transform existing original cloudinary images?

Usually it is recommended to keep the original files as is and to use Cloudinary for creating on demand resized version.
If you still want to, you can use the Admin API to browse through all of your resources. Then you can write a short script which iterates through your resources and re-upload them. You can use the original image's URL as the upload source, and apply an incoming transformation.
For example, here's a Ruby upload call, it's uploading an image from an existing resource, keeping its public ID, and limit its size to be no more than 1000 x 1000 pixels:

Cloudinary::Uploader.upload("<your_cloud_name>/image/upload/v1392564715/my_image.jpg", :width => 1000, :height => 1000, :crop => "limit", :public_id => "my_image")

Note that if the original image's URL was accessed before, it might get cached in the CDN, so accessing the exact URL might still deliver the original image rather than the resized one. For more information:

Have more questions? Submit a request


Powered by Zendesk