my goal is just to reduce image size
my goal is just to reduce image size before putting it into r2
2 Replies
relevant tutorial: https://developers.cloudflare.com/images/tutorials/optimize-user-uploaded-image/
you could use the Images binding to convert the image to WebP (and resize it too, if you want), then upload it to R2
Cloudflare Docs
Transform user-uploaded images before uploading to R2
Set up bindings to connect Images, R2, and Assets to your Worker
Thanks Deanna! i decided to do it on the client instead