About Permanent Asset URLs
Contentstack allows you to assign a permanent URL to an asset. This alternate asset reference remains constant irrespective of any subsequent updates to the asset, so you don't have to update asset URLs manually across entries.
You can find the Generate permanent URL option in the Permanent URL section on the asset details page.
When you generate a permanent URL, you can access the same asset using the following URLs:
- Auto-generated asset URL: The default path to the asset (changes whenever an asset is replaced)
- Permanent asset URL: The non-editable path to the asset (cannot be edited once generated)
Warning: You can generate the permanent asset URL and update the asset details only once. Once done, you can no longer make changes to the permanent URL.
By default, assets (images, pdf, videos, etc.) in Contentstack have a variable URL that changes with every replacement. Let's say you have an image uploaded in Contentstack with the following URL:
When you edit an asset to replace the image in Contentstack, you'll get a new URL:
On the other hand, a permanent URL would not change regardless of the replacements made to the asset file. The default pattern of the permanent asset URL is as follows:
In the above URL, you can assign any unique identifier (slug) that describes your asset.
Note: The maximum number of characters you can enter as a slug for the permanent URL is 255 characters.
To generate a permanent URL for assets and use the permanent URLs to fetch files via the API, you can refer to the following API requests: