Schmidi
CDCloudflare Developers
•Created by Schmidi on 2/27/2025 in #general-help
Help with Image-Transformation Worker
Hello there, I am new to Cloudflare and wanted to use it for a small project. Since someone non-tech related will upload images I thought I could use a worker which transforms the images into webp for example and also changes their dimensions based on requests.
From what I have right now. I made a R2 Bucket and a worker - both free tier.
This is my worker code:
I have deployed this worker but when I am trying to fetch a image which I have stored in the R2 I only get the original image back - no different file extension or size. Clearly I am doing something wrong so I wanted to to ask if this worker code is wrong or if I am missing some bit of configuration. (Overall feel free to correct me if this is not the correct setup at all - since I saw there is also some Service called "Images".
Thanks for any help :)
2 replies