I have a pages project with an image transform endpoint.
As far as I can tell, I can't use Cloudflare's image transform features because the pages function isn't running in the same zone as my website's zone. I assume this is because Custom Domains in Pages are really just DNS record aliases - it's not moving the function to run in the Cloudflare zone where Images is enabled. For presumably the same reasons,
wrangler.toml
wrangler.toml
's
routes
routes
option doesn't work either (
Configuration file for Pages projects does not support "routes"
Configuration file for Pages projects does not support "routes"
).
I still want to have an entire website running, but I want 1 API endpoint which optimises images dynamically.
What's the best way to solve this? For example, do I need to mix and match a separate worker just for the image resize and a pages project for everything else?