Cloudinary Blog

Engineering Better Google Mobile Search Ranking Through Image Optimization

Engineering Better Google Mobile Search Ranking Through Image Optimization

Search ranking algorithms utilize various signals to determine how websites rank against each other on the internet either via desktop or mobile searches. One such signal is Site speed. In 2010, Google introduced Site speed as a signal in their search ranking algorithms. However, this only applied to web search ranking. Starting in July 2018, site speed will be a ranking factor of mobile searches. This change is another signal that developers must wake up and focus on improving the performance of their applications, since speed and load time affects a user’s experience of your page.

According to HTTPArchive, around 64 percent of a website’s average weight is images. Furthermore, surveys from akamai.com and Gomez reveal that 73 percent of mobile internet users have experienced problems with page load times on their devices. A one-second delay in page load time can decrease visitor satisfaction by 16 percent and can lead to a drop in conversion of 7 percent or more.

In this article, I’ll cover why a little discipline in image optimization can go a long way in helping your site load quickly on mobile devices and ultimately improve your mobile search ranking.

First, Identify The Problem

Before making a decision, you need to identify the problem. In this case it focuses on which images on the site needs optimization, and on what part of the site are they concentrated? It’s really not that hard.

Perform a detailed image analysis audit with the powerful Website Speed Test Image Analysis Tool. This tool provides information about the size, formats, quality and encoding of images on your site. Furthermore, it provides actionable tips on how to improve the page load speed.

Website Speed Test

Let’s analyze a mobile site. Check the snapshots of the analysis below:

Website Speed Test
Summary of Page Analysis: 43 Images, Page Image Weight: 6MB

Website Speed Test
First image is too heavy. It can be optimized to be served as JPEG (28 KB), JPEG-XR (26.2KB), and PNG (141.5KB).

Check out more details about the first image and a fix for optimizing the weight problem below:

Website Speed Test
Grade Analysis by the left. Optimization by the right. JPEG is supported in the various browsers shown just above the size. JPEG-XR is only supported in Internet Explorer and Microsoft Edge. No. 1 is a link that leads to the fix, which is the optimized image!

Eric Portis has done a great job of writing an in-depth article focusing on how the Website Speed Test image analysis tool works.

Image Optimization, Speed Matters

Let’s quickly go through a few image optimization techniques, all of which can be achieved easily with Cloudinary.

Optimize Image Quality with q_auto:

Using the q_auto parameter, the optimal quality compression level and optimal encoding settings are selected based on the specific image content, format and the viewing browser. The result is an image with good visual quality and a reduced file size. For example:

Ruby:
cl_image_tag("woman.jpg", :quality=>"auto")
PHP:
cl_image_tag("woman.jpg", array("quality"=>"auto"))
Python:
CloudinaryImage("woman.jpg").image(quality="auto")
Node.js:
cloudinary.image("woman.jpg", {quality: "auto"})
Java:
cloudinary.url().transformation(new Transformation().quality("auto")).imageTag("woman.jpg");
JS:
cloudinary.imageTag('woman.jpg', {quality: "auto"}).toHtml();
jQuery:
$.cloudinary.image("woman.jpg", {quality: "auto"})
React:
<Image publicId="woman.jpg" >
  <Transformation quality="auto" />
</Image>
Angular:
<cl-image public-id="woman.jpg" >
  <cl-transformation quality="auto">
  </cl-transformation>
</cl-image>
.Net:
cloudinary.Api.UrlImgUp.Transform(new Transformation().Quality("auto")).BuildImageTag("woman.jpg")
Android:
MediaManager.get().url().transformation(new Transformation().quality("auto")).generate("woman.jpg");
iOS:
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setQuality("auto")).generate("woman.jpg")!, cloudinary: cloudinary)
Woman

Other options are qauto:best, qauto:low, qauto:good or qauto:eco to ensure higher-than-average quality.

You can manually set the quality with the q_ parameter. Check out the example below:

Ruby:
cl_image_tag("sample.jpg", :quality=>60)
PHP:
cl_image_tag("sample.jpg", array("quality"=>60))
Python:
CloudinaryImage("sample.jpg").image(quality=60)
Node.js:
cloudinary.image("sample.jpg", {quality: 60})
Java:
cloudinary.url().transformation(new Transformation().quality(60)).imageTag("sample.jpg");
JS:
cloudinary.imageTag('sample.jpg', {quality: 60}).toHtml();
jQuery:
$.cloudinary.image("sample.jpg", {quality: 60})
React:
<Image publicId="sample.jpg" >
  <Transformation quality="60" />
</Image>
Angular:
<cl-image public-id="sample.jpg" >
  <cl-transformation quality="60">
  </cl-transformation>
</cl-image>
.Net:
cloudinary.Api.UrlImgUp.Transform(new Transformation().Quality(60)).BuildImageTag("sample.jpg")
Android:
MediaManager.get().url().transformation(new Transformation().quality(60)).generate("sample.jpg");
iOS:
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation().setQuality(60)).generate("sample.jpg")!, cloudinary: cloudinary)
Flowers

The q_60 parameter above decreases the delivered file size from 118KB to 73KB.

Optimize Image Format with f_auto:

Choosing the right format to deliver each image can result in significant file size savings without sacrificing quality. The f_auto parameter enables Cloudinary to analyze the image content and select the best format to deliver. For example, it can automatically deliver images as WebP to Chrome browsers or JPEG-XR to Internet Explorer browsers, while using the original format for all other browsers. Using both f_auto and q_auto, Cloudinary will still generally deliver WebP and JPEG-XR to the relevant browsers, but might deliver selected images as PNG-8 or PNG-24 if the quality algorithm determines that as optimal.

Optimize Image Sizing with dpr_auto and w_auto:

If you deliver full size images and rely on browser-side resizing (using CSS or HTML width and height attributes), users are forced to unnecessarily download large images. Therefore, images should always be delivered from the server at their final size. Cloudinary performs resizing on the server, thus enabling the image to be delivered to the browser at the requested size.

You can ensure that large or high-resolution images will only be delivered to users whose device resolution or browser size requires it by using dpr_auto and w_auto. Check out this example:

Ruby:
cl_image_tag("sample.jpg", :transformation=>[
  {:aspect_ratio=>"4:3", :crop=>"fill"},
  {:width=>"auto", :dpr=>"auto", :crop=>"scale"}
  ])
PHP:
cl_image_tag("sample.jpg", array("transformation"=>array(
  array("aspect_ratio"=>"4:3", "crop"=>"fill"),
  array("width"=>"auto", "dpr"=>"auto", "crop"=>"scale")
  )))
Python:
CloudinaryImage("sample.jpg").image(transformation=[
  {'aspect_ratio': "4:3", 'crop': "fill"},
  {'width': "auto", 'dpr': "auto", 'crop': "scale"}
  ])
Node.js:
cloudinary.image("sample.jpg", {transformation: [
  {aspect_ratio: "4:3", crop: "fill"},
  {width: "auto", dpr: "auto", crop: "scale"}
  ]})
Java:
cloudinary.url().transformation(new Transformation()
  .aspectRatio("4:3").crop("fill").chain()
  .width("auto").dpr("auto").crop("scale")).imageTag("sample.jpg");
JS:
cloudinary.imageTag('sample.jpg', {transformation: [
  {aspectRatio: "4:3", crop: "fill"},
  {width: "auto", dpr: "auto", crop: "scale"}
  ]}).toHtml();
jQuery:
$.cloudinary.image("sample.jpg", {transformation: [
  {aspect_ratio: "4:3", crop: "fill"},
  {width: "auto", dpr: "auto", crop: "scale"}
  ]})
React:
<Image publicId="sample.jpg" >
  <Transformation aspectRatio="4:3" crop="fill" />
  <Transformation width="auto" dpr="auto" crop="scale" />
</Image>
Angular:
<cl-image public-id="sample.jpg" >
  <cl-transformation aspect-ratio="4:3" crop="fill">
  </cl-transformation>
  <cl-transformation width="auto" dpr="auto" crop="scale">
  </cl-transformation>
</cl-image>
.Net:
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .AspectRatio("4:3").Crop("fill").Chain()
  .Width("auto").Dpr("auto").Crop("scale")).BuildImageTag("sample.jpg")
Android:
MediaManager.get().url().transformation(new Transformation()
  .aspectRatio("4:3").crop("fill").chain()
  .width("auto").dpr("auto").crop("scale")).generate("sample.jpg");
iOS:
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
  .setAspectRatio("4:3").setCrop("fill").chain()
  .setWidth("auto").setDpr("auto").setCrop("scale")).generate("sample.jpg")!, cloudinary: cloudinary)
Flowers

The above example will yield a 318KB file on a DPR 2.0 device and 115KB on a DPR 1.0 device. It will be automatically scaled to the width available for the image in the responsive layout, and with a DPR value suitable for the user's device.

Web developers build their sites using a variety of programming languages. I recommend checking out the following resources on image optimization in these languages and also in WordPress:

  1. Image Optimization in PHP.
  2. Image Optimization in Ruby.
  3. Image Optimization in Python.
  4. Image Optimization in WordPress.

Learn More

For additional reading on image optimization, you can review these articles:

Conclusion

One of the best ways to increase page performance is via image optimization. The faster your page loads, the higher the chances of achieving a better mobile search ranking. Don’t leave performance and mobile search ranking gains on the table, optimize your images today with Cloudinary!

Recent Blog Posts

CoreMedia Adds Cloudinary to its CoreMedia Studio Platform

Today we’re pleased to announce a new technology partnership with CoreMedia, a leading Content Experience Platform provider. CoreMedia users can now leverage Cloudinary’s web-based digital asset management (DAM) solution to organize, search, manage and optimize their media assets, including images and videos, and to orchestrate, preview and deliver digital experiences consistently and optimized across all channels and browsers. The official press release is available here.

Read more
Facial-Surveillance System for Restricted Zones

In Africa, where Internet access and bandwidth are limited, it’s not cost-effective or feasible to establish and maintain a connectivity for security and surveillance applications. That challenge makes it almost impossible to build a service that detects, with facial-recognition technology, if someone entering a building is authorized to do so. To meet the final-year research requirement for my undergraduate studies, I developed a facial-surveillance system. Armed with a background in computer vision, I decided to push the limits and see if I could build a surveillance system that does not require recording long video footage.

Read more
Complex Networks Case Study

Complex Networks has been using Cloudinary since 2014 to manage and optimize images across seven websites and two mobile apps, making editorial workflow more efficient, improving page performance and load time, and increasing user engagement. Cloudinary was instrumental in enabling Complex Networks to redesign its web properties. Without the flexibility that Cloudinary offers to both creative and development teams, it would not have been possible for Complex Networks to achieve such a fast time to market.

Read more
Automate Placeholder Generation and Accelerate Page Loads

If you run a Google search on LQIP you’ll see very few relevant articles, very little guidance, and definitely no Wikipedia articles. In this post, we’ll discuss some of the feedback on LQIP we have gathered from the community and suggest and open for conversation a few approaches based on the built-in capabilities of the Cloudinary service. Specifically, we’ll explain what LQIP are, where they are best used, and how you can leverage them to accelerate page loads and optimize user experience.

Read more
Best Practices for Optimizing Web Page Speed

If you're like most consumers today, you engage more with pictures or videos on a website than text. The stats don't lie - four times as many visitors would rather watch a video about a product than read about it, and sites with compelling images average twice as many views as text-heavy ones.

Read more
A day of fun with Girls Who Code and Cloudinary

During both my computer science studies and work in the tech field, there have not been a lot of women present. While our ranks have grown, women still make up only a small percentage. In many ways, I think the traditionally male-dominated world can be intimidating to women and girls who may be interested in pursuing these types of tech careers.

Read more