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

  1. Add @nuxtjs/cloudinary dependency to your Nuxt project:
yarn add @nuxtjs/cloudinary
npm install @nuxtjs/cloudinary
  1. Add @nuxtjs/cloudinary as a module in modules sections of nuxt.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.

Edit this page on GitHub Updated at Sun, Jun 18, 2023