Next.js Discord

Discord Forum

Cloudflare image resizing loader - how does that work?

Unanswered
Dickcissel posted this in #help-forum
Open in Discord
Avatar
DickcisselOP
Hey guys, we want to use Image resizing for our app from Cloudflare but I have not done it before and I cant wrap my head around how these custom resizing loaders work

https://nextjs.org/docs/pages/api-reference/next-config-js/images#cloudflare

I found this guide, seems pretty simple and the simplicity is whats confusing me, please tell me if I have it right:
- On cloudflare that feature gets enabled on the domain of the app
- Since its tied to the domain, this is how it knows who is using it - therefor no API keys/server side stuff is needed
- The images (which we are loading up from an external API) must be under the same domain for it to work, but wouldn that trip it up?
-- For example, if our app is my.app images are coming from api.my.app/image/someimagename.png
- Then just adding the custom loader to fix up the source url, the first time I try to load it up, it will do the resizing and then boom?

0 Replies