Integration between Cloudflare and the image module.
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:
export default defineNuxtConfig({
image: {
cloudflare: {
baseURL: 'https://that-test.site'
}
}
})
Example:
<NuxtImg
provider="cloudflare"
src="/burger.jpeg"
height="300"
:modifiers="{ fit: 'contain' }"
/>
baseURLDefault: /
Your deployment's domain (zone).
Note: /cdn-cgi/image/ will be automatically appended for generating URLs.