-
Notifications
You must be signed in to change notification settings - Fork 319
Closed as not planned
Description
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!
Reactions are currently unavailable