Replies: 1 comment
-
Did you tried without the space in format? <template>
<NuxtImg
src="cover123.jpg"
sizes="100vw sm:50vw md:400px"
- format="webp, jpg"
+ format="webp,jpg"
picture
/>
</template> |
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
-
Hello everyone,
I have a question about image optimization in a static Nuxt 3 project. I want to ensure that both WebP and JPEG versions of my images are generated during the build process.
Goal:
Usage example:
Problem:
After running npm run generate, only one image version (either WebP or JPEG) is generated, but not both. I want to ensure that both formats are created during the build process and that the browser loads either the WebP or the JPEG version depending on its support.
Question:
Is this even possible in a static Nuxt 3 project? If yes, how can I configure it correctly? If there are alternative approaches to achieve this goal, I would appreciate any help.
Thank you in advance!
Best regards,
Frank
Beta Was this translation helpful? Give feedback.
All reactions