Last updated April 29, 2026
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

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

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

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

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

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.