Any suggestions for alternative to
Any suggestions for alternative to Cloudflare Image Resizing? I can't figure out how to cache the resized images and it's getting too expensive.
3 Replies
sent you a DM 🙂
There's this script you can use which keeps a resize of the image stored in the worker cache & R2: https://pastebin.com/B1UcWPbt
Pastebin
addEventListener("fetch", event => { /*event.respondWith(handleReq...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Basically checks
Is the image in worker cache? If yes return that.
If not in the worker cache, check if it's in R2. If it's present store it in the worker cache and return.
Lastly resize it from images, and store in R2/cache then return.