Hi Nuxt Image team,
I’m using Nuxt Image with the Cloudflare provider and have a dynamic route serving images as blobs: /routes/media/:filename. My config works without quality:
$production: {
image: {
format: ['webp', 'avif'],
provider: 'cloudflare',
cloudflare: { baseURL: '/' },
}
}
When I add quality:
$production: {
image: {
format: ['webp', 'avif'],
provider: 'cloudflare',
cloudflare: { baseURL: '/' },
quality: 80,
}
}
Nuxt automatically appends /cdn-cgi/image/ to generate URLs (as noted in the docs):
Note: /cdn-cgi/image/ will be automatically appended for generating URLs.
This breaks my URLs because my dynamic route /routes/media/:filename cannot be fetched correctly via /cdn-cgi/image/....
Question:
How can I use quality (or other optimization options) with a dynamic Nuxt route like /routes/media? Is there a way to make Cloudflare optimization work with dynamic blob routes, or do images need to be served from public/?
Thanks!
Hi Nuxt Image team,
I’m using Nuxt Image with the Cloudflare provider and have a dynamic route serving images as blobs:
/routes/media/:filename. My config works withoutquality:When I add
quality:Nuxt automatically appends
/cdn-cgi/image/to generate URLs (as noted in the docs):This breaks my URLs because my dynamic route
/routes/media/:filenamecannot be fetched correctly via/cdn-cgi/image/....Question:
How can I use
quality(or other optimization options) with a dynamic Nuxt route like/routes/media? Is there a way to make Cloudflare optimization work with dynamic blob routes, or do images need to be served frompublic/?Thanks!