Cloudinary Blog

CDN for Images: Optimize and Deliver Images Faster

By Tal Lev-Ami
CDN for Images: Optimize and Deliver Images Faster

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 media assets 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 media assets 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 and videos embedded in your site and all its resized versions.
 
To summarize, any blogger and any website owner can now optimize and deliver images faster through a CDN for images 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 and videos.
 
You can also refer to this Visual Web resource for Image Delivery and CDN.
 

Recent Blog Posts

Our $2B Valuation

By
Blackstone Growth Invests in Cloudinary

When we started our journey in 2012, we were looking to improve our lives as developers by making it easier for us to handle the arduous tasks of handling images and videos in our code. That initial line of developer code has evolved into a full suite of media experience solutions driven by a mission that gradually revealed itself over the course of the past 10 years: help companies unleash the full potential of their media to create the most engaging visual experiences.

Read more
Direct-to-Consumer E-Commerce Requires Compelling Visual Experiences

When brands like you adopt a direct–to-consumer (DTC) e-commerce approach with no involvement of retailers or marketplaces, you gain direct and timely insight into evolving shopping behaviors. Accordingly, you can accommodate shoppers’ preferences by continually adjusting your product offering and interspersing the shopping journey with moments of excitement and intrigue. Opportunities abound for you to cultivate engaging customer relationships.

Read more
Automatically Translating Videos for an International Audience

No matter your business focus—public service, B2B integration, recruitment—multimedia, in particular video, is remarkably effective in communicating with the audience. Before, making video accessible to diverse viewers involved tasks galore, such as eliciting the service of production studios to manually dub, transcribe, and add subtitles. Those operations were costly and slow, especially for globally destined content.

Read more
Cloudinary Helps Minted Manage Its Image-Generation Pipeline at Scale

Shoppers return time and again to Minted’s global online community of independent artists and designers because they know they can count on unique, statement-making products of the highest quality there. Concurrently, the visual imagery on Minted.com must do justice to the designs into which the creators have poured their hearts and souls. For Minted’s VP of Engineering David Lien, “Because we are a premium brand, we need to ensure that every single one of our product images matches the selected configuration exactly. For example, if you pick an 18x24 art print on blue canvas, we will show that exact combination on the hero images in the PDF.”

Read more
Highlights on ImageCon 2021 and a Preview of ImageCon 2022

New year, same trend! Visual media will continue to play a monumental role in driving online conversions. To keep up with visual-experience trends and best practices, Cloudinary holds an annual conference called ImageCon, a one-of-a-kind event that helps attendees create the most engaging visual experiences possible.

Read more