Getting started

Integration & migration

Image & video API

DAM user guide

API overview


Asset versioning

Learn how to manage and restore different versions of assets in the ImageKit Media Library.

Versioning in ImageKit keeps multiple variants of an asset. It allows you to preserve, retrieve, and restore every version of any asset stored in your DAM. As a result, you can recover more quickly from unintended user actions with versioning.

If ImageKit receives multiple upload requests for the same asset with the same name and location, it creates a new version.

Versioning is enabled on all accounts on any pricing plan. All current plus previous versions of an asset count towards your total storage usage.

The following actions can be performed from the dashboard and programmatically via the APIs:

  1. Create a new file version by uploading a file with the same name and location as an existing file. This can be done by upload API or AI-powered background removal operation, which uploads a new file with the background removed.
  2. Restore the file to a previous version.
  3. Delete any non-current file version.
  4. Get any file version's details.
  5. Get details of all versions of a file.
  6. Search for file versions.

Version limits
An asset can have a maximum of 100 versions.

Searching for file versions in the Media Library

Go to your Media Library in ImageKit's dashboard and click the search bar. To get the desired outcome, check the option to include file versions in search results. You can identify if an asset is a file version by looking at a badge marking it.

Viewing versions
Non-current file versions do not appear in the Media Library by default. You have to search for file versions or navigate to the details page of an asset to view its different versions.

Media Library operations

When a file version is selected, the "Restore version" and "Delete version" options are available in the context menu. Using these options, you can restore the selected file version to the current version of the file or delete the file version respectively. These actions are also available in the menu of the asset details page of file versions. Note that these operations are only available for the non-current version of a file.

Copy/move file

When a file is copied/moved to a destination with an existing file of the same name, the source file versions are appended to the destination file version's history.

In a copy operation, an option to copy all file versions in the folder selection drawer is available. If this is not checked, which is the default behavior, only the current file version is copied. In contrast, all source file versions are moved to the destination in the move operation.

File and file version operations
Media Library operations available for files (current version) and file versions (non-current versions) are different. For example, you cannot update tags, copy, move, rename, edit, download/download (as zip), use extensions, etc., on non-current versions of a file.

Details page

You can choose the version you want to view on the asset details page by clicking the dropdown at the top and selecting the desired version.

URLs and transformations

You can access and transform any version using its unique URL and ImageKit transformation parameters.