The official Nuxt Certification Program in partnership with VueSchool is coming.

<NuxtPicture>

Nuxt provides a <NuxtPicture> component to handle automatic image optimization.

<NuxtPicture> is a drop-in replacement for the native <picture> tag.

Usage of <NuxtPicture> is almost identical to <NuxtImg> but it also allows serving modern formats like webp when possible.

Learn more about the <picture> tag on MDN.

Setup

In order to use <NuxtPicture> you should install and enable the Nuxt Image module:

Terminal
npx nuxi@latest module add image
Read more about the <NuxtPicture> component.