Image & Video APIs

How do I migrate all my existing images and videos to Coudinary?

Last updated: Apr-30-2025

If you already have a collection with many media assets already uploaded and stored somewhere, you have a few options to migrate your existing assets to your Cloudinary product environment. For more details and considerations on migrating your assets to Cloudinary, see the Migration guide.

Lazy migration

Migrate assets on demand from a remote location using Auto Upload, where migration is carried out only when the resource is requested by a visitor.

The auto-upload feature is implemented by mapping a base remote URL to a specified folder prefix in your Cloudinary product environment. Then, whenever accessing a Cloudinary delivery URL containing the folder prefix, the media assets are automatically retrieved from the mapped URL if they are not already uploaded to the folder.

After an asset has been auto-uploaded from the remote location, all requests for the asset will reference the asset stored in your Cloudinary product environment.

Direct migration

Direct migration is a one-time migration based on the upload method of the Upload API for migrating all existing resources in one phase. Cloudinary provides a secure and comprehensive API for easily uploading media files from server-side code, directly from the browser or from a mobile application.

Using Cloudinary's upload capabilities, you can upload media assets in bulk with a variety of options for customizing how they will be uploaded, including naming, whether to apply manually specified or automatically generated tags and metadata, whether to apply incoming transformations or other AI-based analysis of the uploaded assets, and much more. You can upload local files, or even specify a remote URL or bucket as the source for your upload calls, so there's no need to download files locally before uploading to Cloudinary.

For a comprehensive overview of all the options for uploading to Cloudinary, see Uploading assets.

Cloudinary CLI migration

The Cloudinary CLI (Command Line Interface) enables you to interact with Cloudinary through the command line, allowing you to perform Upload API operations by typing commands into a terminal without having to spend time setting up a formal coding environment. Additional helper commands are provided to help you migrate your files over to Cloudinary with minimal effort. You can also combine CLI commands in a batch file to automate the task.

Especially useful are the following commands:

  • migrate - migrates a list of external assets to Cloudinary. The URLs of the files to migrate are listed in a separate file and must all have the same prefix.
  • sync - synchronizes between a local folder and a Cloudinary folder, maintaining the folder structure.
  • upload_dir - uploads a folder of assets, maintaining the folder structure.

Tip
See the Cloudinary training course on migrating media assets.

 

Note
← View all Onboarding FAQ questions

Rate this page:

✔️ Feedback sent!