Providers
Cloudflare
Nuxt Image has first class integration with Cloudflare.
Integration between Cloudflare and the image module.
Before using this provider, make sure to enable Image Transformations for your domain in the Cloudflare dashboard at
Images > Transformations
. If you plan to use images from external domains, also enable "Resize Image from Any Origin".To use this provider you just need to specify the base url (zone) of your service:
nuxt.config.ts
export default defineNuxtConfig({
image: {
cloudflare: {
baseURL: 'https://that-test.site'
}
}
})
Example:
<NuxtImg provider="cloudflare" src="/burger.jpeg" height="300" :modifiers="{ fit: 'contain' }" />
Options
baseURL
Default: /
Your deployment's domain (zone).
Note: /cdn-cgi/image/
will be automatically appended for generating URLs.