How can I copy images between accounts?

When you need to copy images from one Cloudinary account to another - for example when migrating or syncing between staging and production environments - there are two ways you can go about it. 

You can use Cloudinary's auto-migration feature to dynamically copy used images. For more information see http://support.cloudinary.com/hc/en-us/articles/203752361-How-can-I-share-content-between-my-Production-and-Staging-environments-without-risking-my-live-app-.

Otherwise, if you want to pre-load the images, you can do that by writing and running a simple script that will copy the images. The script should iterate through your resources in the source account and upload them one by one to the destination account. Note that you can use concurrent uploads, but please limit concurrency to up to 50 parallel requests.

For the upload itself you can use the source image URL in the upload request, and you can also keep the same public_id. For example in Rails:

Cloudinary::Uploader.upload('http://res.cloudinary.com/<your_source_cloud_name>/image/upload/image.jpg', :public_id => 'the_same_public_id')

 

Have more questions? Submit a request

Comments

Powered by Zendesk