Setup
To use the module, you need a Cloudinary account first. Register for a free account if you haven't got one yet.
You can set up the Cloudinary module easily in two following steps:
Installation
- Add
@nuxtjs/cloudinary
dependency to your Nuxt project:
yarn add @nuxtjs/cloudinary
npm install @nuxtjs/cloudinary
- Add
@nuxtjs/cloudinary
as a module inmodules
sections ofnuxt.config.js
:
nuxt.config.js
export default {
modules: [
'@nuxtjs/cloudinary'
]
}
Configure
Add cloudinary
section in nuxt.config.js
to set configurations for Cloudinary module.
nuxt.config.js
export default {
cloudinary: {
// Cloudinary configuration options
}
}
Then pass your Cloudinary cloud name to cloudName
field option of cloudinary
section:
nuxt.config.js
export default {
cloudinary: {
cloudName: '<your-cloud-name>'
}
}
See options section for all available options to initialize Cloudinary module.
And that's it 🎉
Now you can start optimizing your images and videos with Cloudinary.