Image Transformation Not Working via Worker

Hello, I am trying to use image transformation via Cloudflare Image Optimization. I have deployed a worker which is almost identical to the example provided in the docs (https://developers.cloudflare.com/images/transform-images/transform-via-workers/#an-example-worker).
If I hit my worker in a browser tab (eg. https://image-helper.abcdefg.workers.dev/?width=10&height=10&image=https://images.example.com/example.png) , the original image is displayed (no transformation is done). I can also see that the response does not have a Cf-Resized header. I know that you can enable Image Transformations on a particular zone but I'm not sure how that applies to using the service via a worker. Does anyone have any thoughts as to what I may be missing? Is there anything else I can debug? Thanks in advance.
Cloudflare Docs
Transform via Workers · Cloudflare Image Optimization docs
Using Cloudflare Workers to transform with a custom URL scheme gives you powerful programmatic control over every image request.
1 Reply
Chaika
Chaika8mo ago
If I hit my worker in a browser tab (eg. https://image-helper.abcdefg.workers.dev/?width=10&height=10&image=https://images.example.com/example.png) , the original image is displayed (no transformation is done).
Your workers.dev domain does not have Image Resizing enabled on it, nor can it. Under Images -> Transformations you can enable it for a specific zone. Once you do so, you can use a Custom Domain or a Worker Route to run your worker on that zone, which will allow it to use image resizing
Want results from more Discord servers?
Add your server