Skip Navigation
Heroku Dev Center Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
Heroku Dev Center Dev Center
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log in or Sign up
Show nav
View categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Platform Principles
    • Buildpacks
  • Developer Tools
    • AI Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • .NET
      • Working with .NET
    • Clojure
    • Front-end
    • Go
      • Go Dependency Management
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • Node.js
      • Troubleshooting Node.js Apps
      • Node.js Behavior in Heroku
      • Working with Node.js
    • PHP
      • PHP Behavior in Heroku
      • Working with PHP
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Ruby
      • Rails Support
        • Working with Rails
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Scala
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
      • Heroku Postgres Advanced (Limited GA)
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Inference Essentials
    • Inference API
    • Inference Quick Start Guides
    • AI Models
    • Tool Use
    • AI Integrations
    • Vector Database
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
    • Heroku AppLink
      • Getting Started with Heroku AppLink
      • Working with Heroku AppLink
      • Heroku AppLink Reference
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Other Salesforce Integrations
  • Add-ons
  • All Add-ons
  • Cloudinary - Image and Video Management

Cloudinary - Image and Video Management

Table of Contents [expand]

  • Sample transformations
  • Install the add-on
  • Using with Ruby on Rails
  • Using with Node.js
  • Using with Django
  • Local environment setup
  • Management console
  • Support
  • Additional resources

Last updated April 29, 2026

Cloudinary - Image and Video Management

This add-on is operated by Cloudinary Ltd.

Manage, optimize, and deliver high-performance image and video experiences.

Cloudinary is a cloud service that offers a solution to a web application’s entire image management pipeline.

Easily upload images to the cloud. Automatically perform smart image resizing, cropping and conversion without installing any complex software. Integrate Facebook or Twitter profile image extraction in a snap, in any dimension and style to match your website’s graphics requirements. Images are seamlessly delivered through a fast CDN, and much much more.

Cloudinary offers comprehensive APIs and administration capabilities and is easy to integrate with any web application, existing or new.

Cloudinary provides URL and HTTP based APIs that can be easily integrated with any Web development framework.

For Ruby on Rails, Django, and Node.js, Cloudinary provides libraries for simplifying the integration even further.

Sample transformations

Cloudinary provides a variety of transformations to uploaded images - all available simply by modifying the image URL at runtime. For instance, this sample image is automatically available via a CDN at the following URL:

http://res.cloudinary.com/demo/image/upload/sample.jpg

Sample

Generating a 150x100 version of the sample image and downloading it through a CDN:

http://res.cloudinary.com/demo/image/upload/w_150,h_100,c_fill/sample.jpg

Sample 150x100

Converting to a 150x100 PNG with rounded corners of 20 pixels:

http://res.cloudinary.com/demo/image/upload/w_150,h_100,c_fill,r_20/sample.png

Sample 150x150 Rounded PNG

For plenty more transformation options, see our image transformations documentation.

Generating a 120x90 thumbnail based on automatic face detection of the Facebook profile picture of Bill Clinton:

http://res.cloudinary.com/demo/image/facebook/c_thumb,g_face,h_90,w_120/billclinton.jpg

Facebook 90x120

For more details, see our documentation for embedding Facebook and Twitter profile pictures.

For a more advanced example, take a look at the following Cloudinary URL that generates the image below:

http://res.cloudinary.com/demo/image/facebook/w_150,h_150,c_thumb,g_face,r_20,e_sepia/l_techcrunch,g_south_west,x_5,y_5,w_50/a_10/AriannaHuffington.png

Advanced 174x174

Replace demo in all examples above with your Cloudinary’s cloud name you get after installing the add-on.

What happened here? Simply accessing the above URL told Cloudinary to remotely fetch Arriana Huffington’s Facebook profile picture, created a 150x150px thumbnail using face detection based cropping, rounded the image’s corners, added a sepia effect, converted it to a transparent PNG format, added a watermark layer on the bottom-left corner, rotated the image by 10 degrees clock-wise and ultimately delivered the resulting image through a fast CDN using smart caching techniques. Isn’t that great?

Install the add-on

To install the free version of Cloudinary add-on, simply run:

$ heroku addons:create cloudinary
-----> Adding cloudinary to myapp... done

You can also do this from the Resources section of your application’s configuration page on Heroku.

Using with Ruby on Rails

Getting started guide

Take a look at our Getting started guide for Ruby on Rails.

Installation

Edit your Gemfile, add the following line and run bundle install

gem 'cloudinary'

If you would like to use our optional integration module of image uploads with ActiveRecord using CarrierWave, install CarrierWave gem:

Edit your Gemfile and run bundle install:

gem 'carrierwave'
gem 'cloudinary'

Note: The CarrierWave gem should be loaded before the Cloudinary gem.

Upload

Assuming you have your Cloudinary configuration parameters defined (cloud_name, api_key, api_secret defined via CLOUDINARY_URL configuration variable), uploading to Cloudinary is very simple.

The following example uploads a local JPG to the cloud:

Cloudinary::Uploader.upload("my_picture.png")

# => {"public_id"=>"aamzahmqpc0irmlrcakyg", "version"=>1336304198, "signature"=>"abcdefgc024acceb1c5baa8dca46797137fa5ae0c3", "width"=>80, "height"=>120, "format"=>"png", "resource_type"=>"image", "url"=>"http://res.cloudinary.com/demo/image/upload/v1336304198/aamzahmqpc0irmlrcakyg.png", "secure_url"=>"https://d3jpl91pxevbkh.cloudfront.net/demo/image/upload/v1336304198/aamzahmqpc0irmlrcakyg.png"}

The uploaded image is assigned a randomly generated public ID. The image is immediately available for download through a CDN:

cl_image_tag("aamzahmqpc0irmlrcakyg.png")

# => http://res.cloudinary.com/demo/image/upload/aamzahmqpc0irmlrcakyg.png

You can also specify your own public ID:

Cloudinary::Uploader.upload("http://www.example.com/image.jpg", :public_id => 'sample_remote')

# => {"public_id"=>"sample_remote", "version"=>1336304441, "signature"=>"abcde20044f8c8ba71fb31ebe81e9d72ec8763dd", "width"=>100, "height"=>100, "format"=>"jpg", "resource_type"=>"image", "url"=>"http://res.cloudinary.com/demo/image/upload/v1336304441/sample_remote.jpg", "secure_url"=>"https://d3jpl91pxevbkh.cloudfront.net/demo/image/upload/v1336304441/sample_remote.jpg"}

The uploaded image is assigned with the given sample_remote public ID. The image is immediately available for download through a CDN:

cl_image_tag("sample_remote.jpg")

# => http://res.cloudinary.com/demo/image/upload/sample_remote.jpg

See our documentation for plenty more options of direct uploading to the cloud from your Ruby code or directly from the browser.