Replies: 1 comment
-
|
For AVIF/WebP/JPEG fallback, use <NuxtPicture
src="/images/example.jpg"
format="avif,webp"
legacy-format="jpg"
width="800"
height="500"
alt="Example"
/>That generates a export default defineNuxtConfig({
image: {
format: ["avif", "webp"]
}
})So the short version is:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, I'm currently thinking of using the
avifformat for my the Images in my project, but since avif has still quite some incompatible browsers I'd like to fallback to webp or even lower if it is not supported. Does NuxtImage or anything under the hood check if the selected format is supported by the browser requesting it?My other goto would be doing a composable checking if avif is supported, and if so, use avif, else webp.
Beta Was this translation helpful? Give feedback.
All reactions