How to replace images

Hi!

I’m trying to find a way to replace images, both through the API and manual upload.

To give some context:
I upload the image from my back-end, and it’s displayed to the users. The users can then edit it, and the new picture should be saved and keep the same URL as the previous one, just replace it (returns an error saying it’s duplicated at the moment)

I also sometimes have to do some manual edits and need to upload it manually through Cloudflare to replace the image with the same ID/Name.

How can I do that? I haven’t found anything

Hi, current implementation does not have replace method. You need to delete then upload an image.

To keep an url the same, you’d need to use custom ids Custom ID · Cloudflare Image Optimization docs

NOTE: currently it’s not possible to use UUIDs as custom ids.

This topic was automatically closed after 15 days. New replies are no longer allowed.