Cloudinary Blog

Delivering all your websites’ images through a CDN

by Tal Lev-Ami
Delivering all your website images through a CDN
If you take a look at the top 100 blogs you will notice that almost all of them 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 images are delivered via the leading worldwide CDN of Akamai. 
 
How it’s done? Simply prefix all your images with:
 
http://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

Introducing responsive image breakpoints solutions

The number of different devices available and their potential screen resolutions keep increasing, and to support this wide range of resolutions and devices, responsive website design is now the standard. A website's markup must adapt itself to look perfect on all the different devices and in various resolutions, pixel densities and mobile device orientations. Managing, manipulating and delivering images, is one of the main challenges of responsive design that web developers face.

Read more
Different methods to deliver your images via HTTPS

Are you delivering your site via HTTPS or considering it? You're not alone - in 2015 the number of sites running on HTTPS almost doubled. Both consumers and web developers are now much more aware of the value of the humble green lock displayed in the address bar. The benefits of using HTTPS extend beyond the customer’s safety, to SEO boosts, and advanced functionalities that are only available when delivering via HTTPS, such as HTTP/2 and WebRTC.

Read more

How to get media to load faster on your website

by Kasia Kramnik
Tips and tricks to help your website's media load faster

This is a guest post by Kasia Kramnik, Content Marketing Manager at Netguru, a full stack development house and one of Cloudinary's Consulting partners.

Take a look at your website. Are you happy with the way it looks? I bet you are, and that’s really awesome. Keep in mind though, there is one thing you can’t actually see, but you need to experience: the load speed. Sometimes the most important element is invisible to the eye. In this article you’ll find tips on perfecting the invisible as well: loading your site and media with visibly better results.

Read more

Happy New Year and a hat trick

by Nadav Soferman
Happy New Year and a hat trick

As the end of 2015 approaches, we wanted to share a quick summary of Cloudinary’s accomplishment this year and some of our plans for next year. We couldn't possibly do this without including an image manipulation example! That's our hat trick in the title :-)

Read more