Image Trasform via URL not working for images stored in Cloudflare Image Stream

I would like to use Cloudflare Transform via URL for Images, but it is not working (I am getting Error 9524: image could not be resized (404)) if the image link I am using is using the Cloudflare Images but if I am not using Cloudflare Stream link like s3 link it is working.

For example:
This is not working - https://mydomain.com/cdn-cgi/image/width=100/https://imagedelivery.net/123/456/public

This is working - https://mydomain.com/cdn-cgi/image/width=100/(https://mybucket.s3.ap-southeast-1.amazonaws.com/email-background-v1.png

A 9524 error sounds like the image request was blocked. Is yours set for public access? (or maybe I’ve got my error numbers mixed up)

If it’s just resizing, you can use Variants:

I already enabled the Public access but got now errror Error 9524: image could not be resized (403), are you able to do transformation via url using Cloudflare Image Stream?

You can resize and blur, and that’s about it. Your example was only a resize, so you’d be able to do that with a Variant.

To layer Transforms on top of Images, that sounds like you’d be double-charged. It does seem odd that the Images product isn’t readily available for Transforms.

Why not put your images in R2 instead?

I just simplified my example but I will also use other transformation options not just resizing.

Do you mean Cloudflare Image will not work for Transformation?

To transform images stored on Cloudflare Images you either use variants:

or flexible variants, which uses a different URL syntax to the other transforms:

After enabling flexible variants you would use https://imagedelivery.net/<ACCOUNT_HASH>/<IMAGE_ID>/w=400,sharpen=3 or https://example.com/cdn-cgi/imagedelivery/<ACCOUNT_HASH>/<IMAGE_ID>/w=400,sharpen=3

This distinction made a lot more sense when these were two separate products.

2 Likes

Cool! So it looks like instead of putting the variant name at the end, you can append settings:

/w=400,rotate=90,brightness=0.5 etc…

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.