Last updated: Feb-09-2023
On this page:
Learn how to optimize all the images on your site automatically, using the Cloudinary Netlify build plugin.
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.
The Cloudinary Netlify plugin
|0:05||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
|0:27||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
|0:50||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
|1:35||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
|1:53||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
|2:38||You can also use a file-based configuration to enable the plugin by specifying
- 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 ComponentDeliver images using the Next.js Image component
Upload Assets in ReactUpload assets using the Upload widget in a React App
Find Your CredentialsLearn 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.