Open JianJroh opened 2 months ago
have you checked the <NuxtImg />
source code? from what I’ve seen, it doesn’t seem like this is possible right now
<NuxtPicture />
has this: https://github.com/nuxt/image/blob/main/src/runtime/components/NuxtPicture.vue#L67
You actually can do it, but you have to set it per-provider. IPX is NuxtImg's default provider, so this works:
image: {
ipx: {
modifiers: {
format: "avif",
},
},
},
But it doesn't support SVG. So any SVG images will also be converted to a AVIF in this case, you can not override it on individual elements like this <NuxtImg format="svg" />
, for example. :(
I have seen https://image.nuxt.com/get-started/configuration#format. But it seems to work only for
<NuxtPicture>