Netlify plugin (video tutorial)
Last updated: Feb-09-2023
On this page:
Overview
Learn how to optimize all the images on your site automatically, using the Cloudinary Netlify build plugin.
Video tutorial
Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.
The Cloudinary Netlify plugin
Netlify is a web platform that allows you to build and deploy web apps globally, and includes delivering assets from a CDN. However, Cloudinary can be used to optimize the delivery of these assets even further. The Cloudinary Netlify plugin applies blanket optimization to all images on a Netlify site. | |
Install the plugin
To install the Cloudinary Netlify plugin, log into your Netlify site, select the Plugins tab, click Go to plugins directory and search for Cloudinary. Click Install for the Cloudinary plugin and select the site where you want to install the plugin. | |
Configure your Cloudinary account for your Netlify site
Click Site settings, Build & deploy then Environment to see the section on Environment variables. Click Edit variables to add a new variable with key CLOUDINARY_CLOUD_NAME, then set the value to your cloud name, which you can find on your Programmable Media dashboard. Then click Save. | |
Trigger a new build and deploy for your Netlify site
Click Site overview, then Production deploys (or navigate to the Deploys tab). Then click Trigger deploy > Deploy site and wait for the site to be published. | |
Notice how your images are optimized
If you look at your site using developer tools, you can see that your images are now being fetched by Cloudinary and delivered with automatic format and automatic quality transformations. | |
Use a file-based configuration
You can also use a file-based configuration to enable the plugin by specifying package="netlify-plugin-cloudinary" and configuring the plugin inputs. In addition to specifying your cloud name as an input, you can also specify more advanced features such as the delivery type and an upload preset. |
|
Keep learning
Related topics
- Watch more Dev Hints videos on the Cloudinary YouTube channel.
- Learn more about image and video optimization.
- Find out more about the Cloudinary Netlify plugin.
If you like this, you might also like...
Using the Next.js Image Component
Deliver images using the Next.js Image componentUpload Assets in React
Upload assets using the Upload widget in a React AppFind Your Credentials
Learn how to find your cloud name, API key and API secret
Check out the Cloudinary Academy for free self-paced Cloudinary courses on a variety of developer or DAM topics, or register for formal instructor-led courses, either virtual or on-site.
✖️