How to Serve Uploaded Cloudflare Images in Multiple Formats?

Just started using CF images recently, and am storing images uploaded via API. I would like to now post these to my Webflow site, within a CMS module, and have links for downloads as different file types. (.webp, .jpg, .png, .svg) I thought this was possible after reading https://developers.cloudflare.com/images/transform-images/transform-via-url/, but I still can't figure out how to do this with the URL cloudflare gives me (https://imagedelivery.net/<ACCOUNT_HASH>/<IMAGE_ID>/public) once I upload an image. How would I do this with my images in CF Images? Also, is there any way to change the name of the variant from public to something more custom via API? I appreciate any help as I am new to this. Thank you in advance!
1 Reply
Erisa
Erisa10mo ago
It isn't possible at the moment to specify the format in the URL: https://developers.cloudflare.com/images/transform-images/transform-via-url/#format It needs to be specified in the browser Accept request header, which is not something you can do for download links.
Also, is there any way to change the name of the variant from public to something more custom via API?
You should be able to create a new variant with identical settings and give that a custom name, the name can't be changed as it would break existing URLs
Want results from more Discord servers?
Add your server