Astro cloudflare adapter ssr images not working

I an astro project on cloudflare pages using astro ssr option.
I want to use SSR, so I configured image service in astro config to ‘cloudflare’.
I bought the 5 EUR/ a month Cloudflare Images option so that images can be stored and resized heree, but the server generated images don’t work.
I get a 404 for an url https://astro-cloudflare-image-latest.pages.dev/cdn-cgi/image/width=2000,format=webp/_astro/bird.DdPxpCJ0.jpg and info there that the image can not be shown because it contains errors.
What am I missing? Do I need any addtional step to make images from astro work on cloudflare?
I made a simplified case in a repo:
GitHub - halas/astro-cloudflare-image-latest: test repo to debug astro cloudflare image transforms

Thank you in advance for your help :slightly_smiling_face:

Ok, good people at the astro discord explained to me that image optimisation needs to be enabled per page as in domain. So it does not work on pages deployed to pages.dev without a domain attached.

1 Like