Enabling Image Resizing not per-domain

I need to use Image Resizing ONLY via worker (i.e. no /cdn-cgi/image path), but the worker will be deployed on about 20 different domains. I will not buy 20 pro licenses to do this, but it seems like Image Resizing via worker is tied to the cdn-cgi/image version for some reason. How can I enable Image Resizing for my worker without enabling it for each domain?
7 Replies
Erisa
Erisa11mo ago
The last user who had this question managed to do a workaround of redirecting /cdn-cgi/image elsewhere so that nobody could use it https://discord.com/channels/595317990191398933/1126798634663542836 sub-optimal though, not a real solution
Ottomated
Ottomated11mo ago
I saw that, but that doesn't help me with the problem of enabling it for multiple domains without paying for all of them.
Erisa
Erisa11mo ago
Oh I see, sorry I misread (or rather, only read the part of about /cdn-cg/image and skimmed the rest) I don't believe that's supported unfortunately
Palash Bansal
Palash Bansal11mo ago
Its possible to use wasm to load and resize image with image-js or jsquash. Its a bit slow, so it requires unbound workers on workers paid, but then its possible to do resize on any domain
Coshmar Alkoholik
Hi, how can one use image-js on worker? Whenever I try to use any image manipulating library, I end up with error like:
(0 , _fs.readFile) is not a function
Palash Bansal
Palash Bansal11mo ago
Have you tried setting node compat flag in wrangler
Coshmar Alkoholik
of course