Understanding Asset URL
An asset URL is automatically generated when you upload an asset to Contentstack. The URL adheres to a predefined structure, as shown below:
https://{base_url}/v3/assets/{stack_api_key}/{asset_uid}/{version_uid}/filename
Here's the breakdown of the asset URL:
- base_url: Indicates the domain used for your asset. Assets can have either of these base URLs:
- assets.contentstack.io: Used for generic assets.
- images.contentstack.io: Used for image files specifically.
- stack_api_key: The API key of your stack.
- asset_uid: The unique ID for the specific asset.
- version_uid: A unique identifier for the specific version of the asset.
Additional Resource: For assets that are updated frequently, you can generate a permanent URL, which remains constant even when new versions of the asset are uploaded. This ensures consistent references to the asset.