Cloudinary Blog

Are you guilty of making these mistakes when handling images on your website?

Most common image handline mistakes of web developers

Back in 2013, Cloudinary published a blog post entitled "Top 10 Mistakes in Handling Website Images". Though these top 10 mistakes still hold true, we've come up with a few additional points that we thought you'd find of interest.

As the number of images and videos on a website continue to grow, slower load times and thus a negative user experience are both growing concerns for any company.  An article this summer in The Fiscal Times, citing Internet data measurement company HTTP Archive, noted that the average website is now 2.1 MB in size, compared to 1.5 MB two years ago. And one of the biggest reasons for this growth is the addition of content such as videos and engaging images designed to drive more traffic to the site.  

The Fiscal Times - Web Slowing Down - Chart

The article illustrated that images account for almost 63 percent of the bytes (1,312 KB of the total 2,087 KB) of the average page by content type.  Video came in a distant second at 10 percent (208 KB).  

The impact of images on a website can be dramatic, eating costly bandwidth and increasing the time website visitors spend waiting for images to load. When every passing second reduces your website's overall conversion rate and ultimately revenues, it makes perfect sense to want to optimize your images and their delivery as much as possible.

If you're having problems, it's possible you're making one – or more – key mistakes with images, which prevent you from improving your website's performance and user experience. Here's a look at some of the most common mistakes, and how to avoid them:

Not using more efficient, modern image formats

Even though Google has added support for its WebP image format to Chrome browsers, and Microsoft has done the same for JPEG-XR in most of their Internet Explorer and Edge browsers, developers have still not embraced them.  Perhaps developers aren't aware of these formats, or maybe it's too difficult for them to deliver different image formats to various browsers and devices. As a result, they're sticking with the same JPG and PNG formats, and not taking advantage of how the modern formats can optimize their sites.

How to fix: Convert images to the WebP and JPEG-XR modern formats, while also adjusting compression quality to balance between the formats.  Also by detecting the specific browser that accesses each image and delivering a different version of the image to the respective browser, you can ensure users receive the best images possible, in terms of visual quality and file size optimization.

JPG Image
16.9KB JPG
WebP Automatic Image
6.9KB WebP

Embedding short video clips using the GIF format

Most developers rely on the GIF image format to display short video clips on news sites, media sites and social sharing sites. While the GIF format is easy to use for embedding video clips using a simple HTML image tag, it is not efficient for captured movies because the files are huge and slow to load, especially on mobile devices, resulting in high bandwidth costs and high CPU utilization.

How to fix:  There are several ways to deliver and embed the same clips and animations using modern file formats, such as Animated WebP for Chrome browser users.  Another approach is to apply lossy compression of the GIF File, which results in a slight visual quality reduction but significantly decreases the file size. GIF files can also be converted to MP4 or WebM video formats, embedding the clips and HTML5 video tags instead of the image tag. In most modern browsers, this works smoothly and the site looks exactly the same but loads much faster. By taking one of these steps, you will be able to reduce the file size dramatically, saving page load time, improving user experience and cutting bandwidth costs.

https://res.cloudinary.com/demo/image/upload/kitten_fighting.gif
6.3MB GIF
311KB MP4

Delivering 2X (Retina-display) images to all users

Modern mobile devices and laptops have high device pixel ratios (DPR). Because site owners and developers want their sites to look great on these devices, they embed double resolution images. While this is a good practice, many developers tend to deliver the same size images to all users. As a result, users with regular displays (e.g., non-Retina displays) must download the hi-res images while their displays only benefit from half the resolution. This results in wasted time waiting for pages to load and increases bandwidth costs unnecessarily.  

How to fix: Create different resolutions for each DPR value (e.g., regular images and double resolution images) and automatically detect the DPR value of the web page in the current user's browser. This will enable you to deliver regular images to users with regular displays and 2x resolution images to users with Retina display devices.

DPR 1.0 thumbnail in HTML

DPR 2.0 thumbnail in HTML

DPR 1.0 - 100x100 - 4.6KB                  DPR 2.0 - 200x200 - 12.1KB

And don't forget the top 10 mistakes highlighted in our previous blog post

  1. Wasteful browser-side resizing
  2. Unnecessarily high quality JPEGs
  3. Incorrect image file types
  4. Delivering non-optimized images
  5. Forgetting to strip image meta-data
  6. Delivering images straight from your servers
  7. Delivering static icons one by one
  8. Using images when CSS3 can be used
  9. Incorrect image cache settings
  10. Using a single image size across all delivery mediums

Want to correct these problems?

Do you find yourself making at least one – if not more – of these mistakes, and could benefit by re-evaluating your processes and optimizing the way you handle images?  

Cloudinary can help.  We've got you covered from upload through storage, manipulation, optimization and delivery. Sign up for free and discover how we can help you avoid these problems.

Recent Blog Posts

How the Right Tools and Training Drive SDR Success

Here at Cloudinary, I head a team of eight SDRs, who are responsible for creating the first impression potential customers have of our company’s brand. In just the first 10 months of 2017, our team of outbound SDRs have been responsible for sending more than 67,000 personalized emails and making more than 15,000 calls.

Read more
The JS video player that developers will love (How To)

It doesn't take a genius (or a statistician) to know that video represents a significant proportion of web and mobile content these days. But did you realize that in 2017, video will account for about 75% of all internet traffic and that 55% of people watch videos online every day? In fact, 52% of marketing professionals worldwide believe that video is the content type with the best ROI, with people spending up to 2.6x more time on pages with video than on those without.

Read more
 Beyond Drupal Media: Make Images and Video Fly with Cloudinary

Drupal is a very popular open source content management system (CMS) that has been deployed countless times by organizations and developers around the world. Drupal gained a reputation for being very flexible, powerful and robust in creating complex websites. With Drupal, you can create everything from plain websites, blogs and forums to ambitious enterprise systems.

Read more
Curbing Terrorist Content Online

Today, Cloudinary is proud to announce that it has joined The Global Internet Forum to Counter Terrorism (GIFCT), to help fight the spread of terrorist and violent extremist content on the Internet. The forum was established by Facebook, Microsoft, Twitter and YouTube in mid-2017. Cloudinary will contribute to the hash-sharing database, which all contributing companies can use to help identify and block terrorist related images and videos upon upload.

Read more
Introducing the complete video solution for developers

Videos in web sites and apps are starting to catch up with images in terms of popularity and they are a constantly growing part of the media strategy for most organizations. This means bigger challenges for developers who need to handle these videos in their web sites and mobile apps. Cloudinary's mission is to solve all developer needs around image and video management. In this blog post, we are excited to introduce Cloudinary's complete cloud-based video management solution for developers.

Read more
Getting Started with StencilJS

Stencil is basically a compiler, not necessarily a UI library. A compiler that transforms TSX (TypeScript + JSX) into self-contained custom components.

Before you start learning about the tool, it’s important to note that Stencil is not another heavy JavaScript framework you need to learn. If you have worked with Angular or React, or understand web components, then Stencil is worth a look.

Read more