2023-10-18 10:35:58 +00:00
---
title: "< NuxtPicture > "
description: "Nuxt provides a < NuxtPicture > component to handle automatic image optimization."
2023-10-18 10:59:43 +00:00
links:
- label: Source
icon: i-simple-icons-github
2024-08-28 12:28:14 +00:00
to: https://github.com/nuxt/image/blob/main/src/runtime/components/NuxtPicture.vue
2023-10-18 10:59:43 +00:00
size: xs
2023-10-18 10:35:58 +00:00
---
`<NuxtPicture>` is a drop-in replacement for the native `<picture>` tag.
2023-10-18 10:59:43 +00:00
Usage of `<NuxtPicture>` is almost identical to [`<NuxtImg>` ](/docs/api/components/nuxt-img ) but it also allows serving modern formats like `webp` when possible.
2023-10-18 10:35:58 +00:00
Learn more about the [`<picture>` tag on MDN ](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture ).
## Setup
In order to use `<NuxtPicture>` you should install and enable the Nuxt Image module:
```bash [Terminal]
npx nuxi@latest module add image
```
2023-10-18 10:59:43 +00:00
::read-more{to="https://image.nuxt.com/usage/nuxt-picture" target="_blank"}
2023-10-18 10:35:58 +00:00
Read more about the `<NuxtPicture>` component.
::