Astro Image component

I'm using the new experimental stuff and using Astro's Image component, but when I deploy the images don't work because it's a url like
/_image?href=%2F_astro%2Flogo-horizontal-black.BLA2JIcF.svg&f=svg
/_image?href=%2F_astro%2Flogo-horizontal-black.BLA2JIcF.svg&f=svg
which is giving error code: 1042
3 Replies
itsmatteomanf
itsmatteomanf3mo ago
You should read the Astro docs… specifically the Cloudflare adapter and the assets docs. I don’t have the link handy, as I’m on mobile, but Workers (and Pages) in SSR mode don’t support sharp. You need to pre-render or do other things.
Amos
AmosOP3mo ago
I did, but thought I could do something this
adapter: cloudflare({
platformProxy: {
enabled: true,
},
routes: {
extend: {
exclude: [{ pattern: "/**/*" }],
},
},
}),
adapter: cloudflare({
platformProxy: {
enabled: true,
},
routes: {
extend: {
exclude: [{ pattern: "/**/*" }],
},
},
}),
Instead I just set it to "hybrid" output and it works
itsmatteomanf
itsmatteomanf3mo ago
In Cloudflare, to use SSR, you need to use the Cloudflare image resizing option
Want results from more Discord servers?
Add your server