Duplicate an existing image to new one

Is there a way/api to duplicate an existing image in cloudflare images to new image/id and get the newly created image id? This is not about variants. Because variants may get deleted if the base image got deleted.

No, we don’t have such thing. I’m curious what is your use case?

Thanks for your reply @asemiglazov.

Let’s say I’m uploading photos of iphone 15 pro in my ecommerce store with same colour and multiple storage configurations. So, the images looks the same, and uploading a single set of images for all models. But if I use same image for all storage options, if one image get deleted for storage option 256GB, it’ll get deleted for other iphone variants too.

Also, This can be helpful to reduce the network usage when creating multiple models of mobiles, laptops or any other items in a store which is using a common set of images. I think you got my point.

I got your point.

I think is a matter of taste in system design and product catalog, when it comes to e-commerce, a product card can be one:

single product id with multiple modifications, e.g. this is how fashion shops sell sizes.

Another example is Amazon.
Example: https://www.amazon.co.uk/Apple-iPhone-15-128-GB/dp/B0CHX13YPM/
when you click on different modifications, it actually uses same pictures.

Media Markt does the way you described Apple MacBook Air Cinzento Sideral MGN63PO/A - Portátil 13.3" M1 8GB 2 – MediaMarkt.

I’m not saying there is right or wrong way of doing it, just a food for thought.

Back to your initial request, I don’t think we will take it into work any time soon. If you want to avoid moving data from and to Cloudflare, you can create a worker just to to this:

Talk to api to fetch base image Cloudflare API Documentation and insert it back.

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