When replacing asset keep same url

Is your feature request related to a problem? Please describe.
When uploading assets and using them in rich text fields, which we are doing quite a bit, when replacing the assets in media we expected the url to remain the same so that all the links would point to the new asset. Unfortunately the url changes every time we use “replace asset”, making the user have to know where that asset is being linked to and manually go and update them. We also may use these urls outside of the CMS which would cause more headache.

Describe the solution you’d like
The ability to keep the original url of the asset when it’s replaced.

Describe alternatives you’ve considered
We have to manually update urls and it gets hard to remember where everything is used to update.

Sorry but our CDN has to be considered immutable: you cannot change the content of an existing URL afterwards. This allows us to be extremely fast and forever cacheable.

So what are we supposed to do when someone adds an asset to a markdown or html block and they update that asset in the CMS backend? It won’t update automatically and there is no indicator that the file url needs to be updated in different places.

@flipxfx I think the best way to deal with this is to use a modular content with an asset so that you can avoid having lost links inside.

If you really cannot avoid the markdown the only idea I have is that you set up some webhook and you take care yourself to update the URLs of the images whenever you change the assets :frowning:

Yes our users link to documents and like to put pictures mid-content for blogs etc. It would be awkward to have to use modular content just to put links to things. :thinking:

We found it sort of misleading since you can choose images to place in HTML/Markdown blocks via the media explorer. If there’s no good way to fix this I would at least warn the user that the asset they pick will not be updated if it’s updated via media.

If there’s no way for this to work correctly with the current CDN what would a webhook like this look like? Or is there some way to have urls in-front the CDN that don’t change or a way to invalidate?

Makes sense what you are saying.

We are going to try something out to see if that is not too heavy on our DB, not sure when, but we are going to try something out.