Description:
When configuring imageService: 'compile' with the Cloudflare adapter v13 in Astro6, the dev server still attempts to use cloudflare-binding image transformation, which fails because env.IMAGES binding doesn't exist in local development.
Reproduction:
Create Astro6 project with @astrojs/cloudflare@13.1.2
Configure adapter with imageService: 'compile'
Run npm run dev
Load a page with an image
Error: TypeError: Cannot read properties of undefined (reading 'fetch') at image-binding-transform.js:17:72
Expected:
Dev server should use Sharp-based transformation (compile) or passthrough, not cloudflare-binding.
Config:
adapter: cloudflare({
imageService: 'compile',
}),
Environment:
Astro: 6.0.5
@astrojs/cloudflare: 13.1.2
Node: 22.12.0
OS: macOS