Setup

Cloudinary Source Plugin is a simple way to get existing Cloudinary assets to use in Gridsome apps with optimization.

Demo site

To use the plugin, you need a Cloudinary account first. Register for a free account if you haven't got one yet.

You can set up the source plugin easily in two following steps:

Installation

  1. Add gridsome-source-cloudinary dependency to your Gridsome project.

    yarn add gridsome-source-cloudinary
    
    #OR
    npm i gridsome-source-cloudinary
  2. Add gridsome-source-cloudinary as a plugin to plugins section of gridsome.config.js:

    /* gridsome.config.js */
    
    export default {
      plugins: [
        {
          use: 'gridsome-source-cloudinary',
          options: {
            /* Cloudinary configuration options */
          },
        },
      ]
    }

See Options for all available options to initialize Cloudinary source plugin.

And that's it 🎉!