Setup
Using image module in your NuxtJS project is only one command away ✨
Installation
Add @nuxt/image
devDependency to your project:
yarn add --dev @nuxt/image
npm install -D @nuxt/image
Add the module to the buildModules
of your nuxt.config
:
nuxt.config.js
export default {
buildModules: ['@nuxt/image']
}
That's it! You can can start using <nuxt-img>
and <nuxt-picture>
components in your Nuxt app ✨
Configure
Add an image
section in your nuxt.config.js
:
nuxt.config.js
export default {
image: {
// Options
}
}
See module options.
Edit this page on GitHub
Updated at Mon, Feb 15, 2021