Contentful logo

Contentful Community

Copied content between environments & assets urls inside markdown fields

How does Contentful handle asset links inside text fields?

Our scenario:

  1. We’re using Markdown editor interface & longtext fields. When inserting a picture using Markdown editor, as an absolute link is added, pointing to an Asset.

  2. We’re using two environments, one to prepare release data (staging), and master. During our release, we’ve copied content from staging environment to master (using contentful-import cli), and obviously after this phase, the absolute image URLs inside longtext field still point to assets created in staging environment.

  3. Now, if we decide, to delete the the staging environment, will all of our images suddenly disappear? I’ve tested this using a single image, and the asset URL seems to work even if the image is deleted from staging environment. The asset URL does not seem to reference environment at all, and my guess it is versioned somehow. Asset ID is the same for both environments, but the URL is bit different.

Example:
Original asset (staging):
http://images.ctfassets.net/space-id/asset-id/hexadecimal-value-i-dont-understand/image-name.jpg
Copied asset (master):
http://images.ctfassets.net/space-id/asset-id/other-hexadecimal-value/image-name.jpg

Longtext field in master:
bold text
My image

My question is, can we remove the staging environment, or will all of our img tags get broken after this (unless we manually replace all asset urls with ones pointing to production)?