Difficulty Implementing Cloudflare Image Transformations on Pages

Hello! I'm currently deploying my Astro.js project to pages, connected to a Client's subdomain: site.client-domain.com. Everything is running smoothly, but I've encountered a hurdle when attempting to implement Cloudflare's Image Transformation via URL feature (https://developers.cloudflare.com/images/transform-images/transform-via-url/) for certain images on my page. Despite following the documentation, I'm unable to get it to work. My suspicion is that I need to register a Zone in order to activate Image Transformations. Could you confirm if this is the case? It appears that I'm unable to move forward as I can't create a Zone from a subdomain such as site.client-domain.com. Can you please advise me on alternative options or a workaround to utilize Image Transformations in this scenario? Thank you for your assistance!
Cloudflare Docs
Transform via URL · Cloudflare Image Optimization docs
You can convert and resize images by requesting them via a specially-formatted URL. This way you do not need to write any code, only change HTML …
2 Replies
Nob
Nob8mo ago
I think you can only do with a domain. You can create a worker also
greenappleFF
greenappleFFOP8mo ago
Thanks for your reply I just tried doing so, but it seems like it doesn't work for workers on pages.dev (with linked domain) It simply ignores the cf options on the fetch request. Do you know what I mean
Want results from more Discord servers?
Add your server