advanced-image-optimization-techniques

Image credit: Shutterstock

Today’s web is increasingly becoming a mobile-centric platform. As a result, speed is becoming the top priority for most websites, since mobile users demand ever-faster access to content. In fact, speed has become a key differentiator between websites, and faster sites today stand to gain more users, a greater volume of traffic and higher mobile search rankings. It is no surprise, then, that businesses with an online presence seek to optimize their blogs and websites for performance.

However, web content today also relies heavily on media-rich content. For any business, the use of images in blog posts and site entries is essential. Users tend to prefer image-rich content compared to text-only content. In the overwhelming volume of web content available to users today, the content that is visually appealing is highly preferable to the users, according to numerous studies. As a result, if you want your blog posts to attract genuine readers, you stand a far better chance if you include relevant images.

The Challenge: Loading Images Without Negatively Affecting Speed

This comes with a problem. A text-only blog post is light-weight and loads quickly. An image-heavy post, although effective in attracting the reader, is comparatively slow in loading. The key to a successful website is that you must include images without losing significantly on load times. And there are a number of solutions to this riddle.

Some accomplish this by reducing image size, others by compressing it, while some make use of a mix of both. The intended purpose of each is to load the image on the user’s screen without losing in terms of image quality.A basic concept here is the difference between lossy and lossless optimizations.

Lossy image optimization simply discards the unnecessary pixel data from an image in order to reduce its size. Consequently, the image loads quickly on the user’s end, but the image detail and sharpness are somewhat compromised. This technique works great if you are not concerned with presenting your users with high-resolution images and can work fine with relatively low-resolution images.

A lossless technique, on the other hand, simply compresses a file and then loads it to the user’s screen with lower (or no) loss of detail. Consequently, it may take some time to load, compared to a lossy or highly-compressed image. You have a gain in terms of quality, but lose in terms of the time it takes to decompress and load the image.If you are not very concerned about the page load speed, yet want high-resolution images, this technique is ideal for you.

Finally, there is a third solution that strikes a fine balance between the two techniques and offers the best of both. Called progressive image rendering, this technique first loads a low-resolution image on the user’s end, which means a faster load time. It then renders this image into higher resolution as the site progresses with loading. At the user end, this gives the impression that the image loads instantly and is then refined gradually, ultimately evolving into high-resolution. So this method not only loads the image quickly but also displays it in high-resolution once the image is available.

Image credit: Incapsula

Image credit: Incapsula

WordPress Themes and Plugins That Support Progressive Image Rendering

A number of WordPress themes support progressive image rendering. Many standalone plug-ins also offer this solution. These include the popular Smushit plug-in that automatically applies this technique to every image that you upload to your WordPress site.

Using CDNs for Easy Progressive Image Rendering

An alternative way of implementing progressive image rendering is through a content delivery network (CDN), a service build to enhance websites’ performance and accelerate content delivery.

A CDN’s basic function is to cache content across geographically distributed servers to reduce latency and improve delivery time.Today, many CDNs take it a step further, with automated front-end optimization features that further improve performance, and one of these is progressive image rendering.

In addition, most CDNs will also offer on-the-fly image and file compression, code minification and other useful capabilities that will shave precious milliseconds off your website load times. Because they are free, there is no good reason not to use them.

Pros and Cons

This particular technique does carry its own pros and cons. The solution obviously offers benefits in terms of speed and sustaining the quality of the image. It is particularly useful if your target audience is hooked to a slower Internet connection, or if the images you are using are exceptionally large in size.

It can also be a game-changer when reaching the last-mile audience in remote regions with slow-speed Internet. You may even be able to deliver a better content experience to users over 3G or 4G networks by implementing the technique.

A major drawback of the progressive technique is that it utilizes multiple versions of the same image. While this helps improve speed and maintain image quality, it means greater storage space at the back-end and more processing for the server. If you are using a large number of sizable images, implementing progressive rendering can pose a problem. Again, front-end optimization through a CDN is a solution that can address this need.

Yet after all is said and done, progressive rendering is still a very powerful tool for websites that place a premium on both speed of content delivery and image quality. When used together with other speed-enhancing techniques, it can have a very real impact on how quickly your content is delivered. And this, in turn, can help you grow your site audience over time.