My Docs
My BlogPython Data StructuresRepoFamily-Promise-Docs
Web-Dev-Hub-Docs
Web-Dev-Hub-Docs
  • Home
  • Navigation
  • Tools
    • Tools
      • Docker
      • G-Cloud & Firebase
      • Heroku
      • Dropbox
      • Email
      • Tools
      • DuckDuckGo
      • Elasticsearch
      • CodeSandbox
      • Product Hunt
      • Raycast
      • Elasticsearch
      • Tools
      • Showcase
        • Utilities
        • Continued
          • Page 3:
    • Downloads
    • REPL.IT Compilations
      • Part 2
    • Past Notes
      • Command Line Reference
    • Git
    • JavaScript
      • Interview Problems
      • General JavaScript Notes
      • jQuery
      • NodeJS
        • Node argv
        • NPM
        • Express
          • ExpressJS Overview
          • Sequelize
      • Regex
      • React
        • React Examples:
        • Redux
        • Redux Docs
          • Redux Resources
        • React Notes
    • My Bash Commands
    • Learning
  • Programming Languages
    • Programming Languages
      • File System
      • Basics
      • PSEUDO Programing Languages
        • HTML
      • CSS
      • List Of Programming Languages By Type
      • Tools-Of-The-Trade
        • Linux
        • Docker
      • Git
      • Python
        • Pydrive:
        • Practice
        • Pipenv
        • Untitled
      • Bash
        • SED
      • CHEATSHEETS
      • Java
      • Html
      • Markdown
      • CSS
      • SCSS
      • C & C++
      • Ruby
      • SQL
        • PostgreSQL
      • Jest
      • JavaScript
      • Typescript
      • C++
      • Babel
    • What is a Programming Language?
  • Python
    • Python
      • Python General Notes
      • Python Quiz
      • Python Cheat Sheet
      • Python Snippets
      • Python at length
    • Install PIP
  • JavaScript
    • JavaScript
      • Jquery
      • Page 16
    • Writing Files
    • JS-Leetcode
  • Web Development Frameworks & Libraries
    • GRAPHQL
    • React
    • Jquery
      • Prac
    • GATSBY
      • Untitled
      • Building with Components
      • Plugins, Themes, & Starters
      • GraphQL Concepts
  • Productivity
    • Productivity
      • Awesome Productivity Tools for Back-to-School
  • Misc
    • Misc
      • Experiments
  • GitGateway
    • Links
    • Bookmarks
  • Websites
    • Websites
    • Not My Websites:
    • Articles
  • Backend
    • Backend
  • Networking
    • Networks
  • Resources
    • Web Dev Tutorials
      • Node
        • API Security
    • Resources
    • Video Resources
  • General Knowledge
    • General Knowledge
    • Glossary
    • Knowledge Bank
  • Finance
    • Finance
    • Finance Reference
    • Financial Trends
  • Science & Tech (Innovation)
    • Science & Tech
    • Articles
  • Reading
    • Reading
  • Social Media & Trends
    • Trends In Web Dev
    • Analytics
    • FB-Dev-Open Source
      • Content Publishing
    • IG-API
  • Docs
    • Docs
      • NodeJS
        • installed it?
        • Timers in Node.js and beyond
        • Node.js web app
        • Overview of Blocking vs Non-Blocking
        • Don't Block the Event Loop (or the Worker Pool)
  • Code Editors & Tools
    • Vscode
      • Vscode Docs
      • How To Speed Up Vscode
  • Cool Stuff
    • Cool Observable Notebooks
  • Server-Side
    • GraphQL
      • Intro
    • Rest VS GraphQl
    • REST-API
    • Public APIs
  • WEB_DEV_TOOLS
    • Web Dev Tools
    • Cloudinary
    • Postman
      • Creating an API
      • Trouble Shooting Postman
    • Netlify
      • Facebook Graph API
      • Pandoc
      • Graph API
      • Troubleshooting
      • Examples
      • HTTPS (SSL)
      • Open Authoring
      • Netlify CMS
      • Git Gateway
  • DS_ALGOS_BRAINTEASERS
    • A Quick Guide to Big-O Notation, Memoization, Tabulation, and Sorting Algorithms by Example
  • Free-Stuff
    • Free Stuff
  • Job-Search
    • Job Search
    • Outreach
  • General Comp Sci
    • Principles behind the Agile Manifesto
  • Blockchain & Crypto
    • Blockchain Basics
      • Basics:
  • Data Structures & Interviewing
    • Data Structures
    • Computational Complexity
  • REACT_REVISITED
    • Modern React with Redux
      • React-Projects
  • WEBDEV-Bootcamp-Notes
    • 🏫Lambda
      • 1.1 - User Interface and Git
      • Page 2
      • Page 1
      • Page 3
      • Page 4
      • Page 5
      • Page 6
      • Page 7
      • Page 8
      • Page 9
      • Page 10
      • Page 11
      • Page 12
      • Page 13
      • Page 14
      • Page 15
      • CS-Python-Notes
        • Python
  • Unsorted-Notes
    • Compiled-Random-Notes
    • Testing:
      • Configure Jest for Testing JavaScript Applications
      • install, configure, and script Cypress for JavaScript web applications
      • Test React Components with Jest and `react-testing-library`
      • Use testing library to evaluate any framework...
  • Medium-articles
    • My Articles
      • Python For JS Developers
      • JavaScript Programmer
      • Awesome Web Development Youtube Video Archive
      • Bash Commands That Save Me Time and Frustration
      • Git-Tricks
      • scrap
      • Medium Article
      • Everything You Need To Know About Relational Databases, SQL, PostgreSQL and Sequelize To Build…
      • Machine Learner
      • Here’s the expanded list:
      • The Complete JavaScript Reference Guide
      • This is really cool!
      • Web Development Interview Part 3💻
      • Mutability And Reference VS Privative Types in JavaScript
      • React
      • Super Simple Intro To HTML
      • Introduction to React for Complete Beginners
      • Web Developer Resource List Part 2
      • Front End Interview Questions Part 2
      • A List Of Tools For Improvement
      • Github Repositories That Will Teach You How To Code For Free!
      • Libraries
      • Machine Learner
      • Here’s the expanded list:
      • The Complete JavaScript Reference Guide
  • 🖲️AI
    • Pytorch
      • Documentation
  • 🎙️Audio
    • Audio
Powered by GitBook
On this page
  • Cloudinary is a digital asset management platform with a broad feature set, including support for responsive image generation and url based image transformation. They also provide a powerful media library UI for managing assets, and tools for organizing your assets into a hierarchy.
  • Creating a Cloudinary Account
  • Connecting Cloudinary to Netlify CMS
  • Netlify CMS configuration options
  • Cloudinary configuration options
  • Image transformations
  • Inserting Cloudinary URL in page templates

Was this helpful?

  1. WEB_DEV_TOOLS

Cloudinary

PreviousWeb Dev ToolsNextPostman

Last updated 3 years ago

Was this helpful?

Cloudinary is a digital asset management platform with a broad feature set, including support for responsive image generation and url based image transformation. They also provide a powerful media library UI for managing assets, and tools for organizing your assets into a hierarchy.

The Cloudinary media library integration for Netlify CMS uses Cloudinary's own media library interface within Netlify CMS. To get started, you'll need a Cloudinary account and Netlify CMS 2.3.0 or greater.

Creating a Cloudinary Account

You can for free. Once you're logged in, you'll need to retrieve your Cloud name and API key from the upper left corner of the Cloudinary console.

Cloudinary console screenshot

Connecting Cloudinary to Netlify CMS

To use the Cloudinary media library within Netlify CMS, you'll need to update your Netlify CMS configuration file with the information from your Cloudinary account:

media_library:
  name: cloudinary
  config:
    cloud_name: your_cloud_name
    api_key: your_api_key

Note: The user must be logged in to the Cloudinary account connected to the api_key used in your Netlify CMS configuration.

Security Considerations

Although this setup exposes the cloud_name and api_key publicly via the /admin/config.yml endpoint, this information is not sensitive. Any integration of the Cloudinary media library requires this information to be exposed publicly. To use this library or use the restricted Cloudinary API endpoints, the user must have access to the Cloudinary account login details or the api_secret associated with the cloud_name and api_key.

Netlify CMS configuration options

The following options are specific to the Netlify CMS integration for Cloudinary:

  • use_transformations: (default: true) If true, uses derived url when available (the url will have image transformation segments included). Has no effect if output_filename_only is set to true.

  • use_secure_url: (default: true) Controls whether an http or https URL is provided. Has no effect if output_filename_only is set to true.

Cloudinary configuration options

Authentication

  • cloud_name

  • api_key

Media library behavior

Image transformations

Transforming images via Media Library

Global configuration

Global configuration, which is meant to affect the Cloudinary widget at all times, can be provided as seen below, under the primary media_library property. Settings applied here will affect every instance of the Cloudinary widget.

# global
media_library:
  name: cloudinary
  output_filename_only: false
  config:
    default_transformations:
      - - fetch_format: auto
          width: 160
          quality: auto
          crop: scale

Field configuration

Configuration can also be provided for individual fields that use the media library. The structure is very similar to the global configuration, except the settings are added to an individual field. For example:

# field
fields: # The fields each document in this collection have
- label: 'Cover Image'
  name: 'image'
  widget: 'image'
  required: false
  tagname: ''
  media_library:
    config:
      default_transformations:
        - fetch_format: auto
          width: 300
          quality: auto
          crop: fill
          effect: grayscale

Inserting Cloudinary URL in page templates

If you prefer to provide direction so that images are transformed in a specific way, or dynamically retrieve images based on viewport size, you can do so by providing your own base Cloudinary URL and only storing the asset filenames in your content:

  • Either globally or for specific fields, configure the Cloudinary extension to only output the asset filename

# global
media_library:
  name: cloudinary
  output_filename_only: true
# field
media_library:
  name: cloudinary
  output_filename_only: true
  • Provide a dynamic URL in the site template

{{! handlebars example }}
<img src="https://res.cloudinary.com/<cloud_name>/<resource_type>/<type>/<transformations>/{{image}}"/>

Note: The Netlify CMS media library extensions for Cloudinary are not included in netlify-cms-app. If you're using netlify-cms-app, you'll need to .

output_filename_only: (default: false) By default, the value provided for a selected image is a complete URL for the asset on Cloudinary's CDN. Setting output_filename_only to true will instead produce just the filename (e.g. image.jpg). This should be true if you will be directly embedding cloudinary transformation urls in page templates. Refer to .

The following options are used to configure the media library. All options are listed in Cloudinary's , but only options listed below are available or recommended for the Netlify CMS integration:

default_transformations - only the first is used, be sure to use the SDK Parameter column transformation names from the

max_files _- has no impact on images inside the _. Refer to for details on this property

multiple _- has no impact on images inside the _. Refer to for details on this property

The Cloudinary integration allows images to be transformed in two ways: directly within Netlify CMS via , and separately from the CMS via Cloudinary's by .

If you transform and insert images from within the Cloudinary media library, the transformed image URL will be output by default. This gives the editor complete freedom to make changes to the image output. There are two ways to configure image transformation via media library - and per . Global options will be overridden by field options.

Your dynamic URL can be formed conditionally to provide any desired transformations - please see Cloudinary's for available transformations.

register the media libraries yourself
Inserting Cloudinary URL in page templates
media library documentation
image transformation
transformation reference
markdown widget
media library documentation
markdown widget
media library documentation
Cloudinary's Media Library
dynamic URL's
inserting cloudinary urls
globally
field
image transformation reference
sign up for Cloudinary