Cloudinary Blog

Delivering all your websites’ images through a CDN

By Tal Lev-Ami
Delivering all your website images through a CDN
Most leading blogs deliver their assets (images, JS, CSS, etc.) through state-of-the-art CDNs and utilize online resizing technologies. With faster, off-site access, they greatly improve their users’ browsing experience, while reducing load on their servers.
 
Using Cloudinary you can use these same technologies today, in your website or blog, without any hassle. Simply direct all your images to Cloudinary and they would be delivered to your visitors through Amazon’s powerful CDN network. You can even add alternative dimensions to your images’ URL and get your pictures in any desired size or perspective. All of this with minimum changes on your side.
 
UPDATE - March 2013: All Cloudinary images are delivered via the leading worldwide CDN of Akamai.

UPDATE - November 2016: Customers of the higher Cloudinary plans can choose between Akamai, CloudFront, or Fastly, or even take advantage of smart CDN selection or dynamic multi-CDN switching. For more details, see the multi-CDN blog post.
 
How it’s done? Simply prefix all your images with:
 
https://res.cloudinary.com/<your cloudinary cloud name>/image/fetch/

 
Here's a quick example:
Jennifer Lawrence

Both URLs return the exact same image, only the second one is cached and delivered through fast, localized CDNs and not via your local web server. Better experience to your users. Lower load on your server. Lower hosting costs.
 
Note: that 'demo' in all the URLs should be replaced with your Cloudinary’s cloud name. Click here to set up one in seconds.
 
You can use this method to create different sized thumbnails for the same photo. For example, creating a 150x150 crop focused on Jennifer’s face ('g_face') and with rounded corners of 20 pixels ('r_20') generates the following beautiful image:
 

150x150 Jennifer Lawrence
 
Nice, isn’t it :) see our docs of image transformations for plenty more options.
 
If you are a developer, you can do the same from code. For example, in Ruby on Rails:
 
cl_image_tag("http://upload.wikimedia.org/wikipedia/commons/4/46/" +
                       "Jennifer_Lawrence_at_the_83rd_Academy_Awards.jpg",
                       :type => :fetch, :width => 150, :height => 150,
                       :crop => :thumb, :gravity => :face, :radius => 20)
 
Note that if the image behind the original URL changes, Cloudinary will automatically update the images embedded in your site and all its resized versions.
 
To summarize, any blogger and any website owner can now deliver its website’s images through a CDN and seamlessly create smartly resized and cropped images in any dimension. All that by just adding the Cloudinary resource URL as a prefix to all images.

Recent Blog Posts

Generate Waveform Images from Audio with Cloudinary

This is a reposting of an article written by David Walsh. Check out his blog HERE!
I've been working a lot with visualizations lately, which is a far cry from your normal webpage element interaction coding; you need advanced geometry knowledge, render and performance knowledge, and much more. It's been a great learning experience but it can be challenging and isn't always an interest of all web developers. That's why we use apps and services specializing in complex tasks like Cloudinary: we need it done quickly and by a tool written by an expert.

Read more
Make All Images on Your Website Responsive in 3 Easy Steps

Images are crucial to website performance, but most still don't implement responsive images. It’s not just about fitting an image on the screen, but also making the the image size relatively rational to the device. The srcset and sizes options, which are your best hit are hard to implement. Cloudinary provides an easier way, which we will discuss in this article.

Read more

The Future of Audio and Video on the Web

By Prosper Otemuyiwa
The Future of Audio and Video on the Web

Web sites and platforms are becoming increasingly media-rich. Today, approximately 62 percent of internet traffic is made up of images, with audio and video constituting a growing percentage of the bytes.

Read more

Embed Images in Email Campaigns at Scale

By Sourav Kundu
Embed Images in Email Campaigns at Scale

tl;dr

Cloudinary is a powerful image hosting solution for email marketing campaigns of any size. With features such as advanced image optimization and on-the-fly image transformation, backed by a global CDN, Cloudinary provides the base for a seamless user experience in your email campaigns leading to increased conversion and performance.

Read more
Build the Back-End For Your Own Instagram-style App with Cloudinary

Github Repo

Managing media files (processing, storage and manipulation) is one of the biggest challenges we encounter as practical developers. These challenges include:

A great service called Cloudinary can help us overcome many of these challenges. Together with Cloudinary, let's work on solutions to these challenges and hopefully have a simpler mental model towards media management.

Read more

Build A Miniflix in 10 Minutes

By Prosper Otemuyiwa
Build A Miniflix in 10 Minutes

Developers are constantly faced with challenges of building complex products every single day. And there are constraints on the time needed to build out the features of these products.

Engineering and Product managers want to beat deadlines for projects daily. CEOs want to roll out new products as fast as possible. Entrepreneurs need their MVPs like yesterday. With this in mind, what should developers do?

Read more