How to optimize images for page speed (and Google)

Want to know how to optimize the image for page speed and Google? In this article, you will learn the best image optimization technology for improving performance and solving the Page Speed \u200b\u200bInsights (PSI) image warning.

图片相关问题 - 来源:Google PageSpeed Insights
Image related questions -Source: Google PageSpeed \u200b\u200bInsights

Google is an important income for most companies. The source, so it is important to get a good ranking. Page speed is one of the most important KPIs in the algorithm. You will see how image optimization technology is an excellent way to improve the speed of WordPress website.

Let’s dive into the water.

Why images are important for improving page speeds

According to Google, optimizing images to improve page speed is very important for ranking and user experience. In fact, you need to prepare images for the network.

Do you know that a large number of unbound images are usually the culprit for the slow operation of the website? The following is how the image affects performance:

The overall page speed-

    Large images will slow down your website and make visitors who want to visit information as soon as possible. As shown in the figure below, the picture is the main resource in the webpage:

Page weight divided by content type -Source: Almanac http archive archive 按内容类型划分的页面权重 - 来源:almanac HTTP 存档
Picture is an important source of page weights. They also constitute the largest number of HTTP requests per page:

Request divided by content type -Source: Almanac HTTP archive 按内容类型的请求 - 来源:almanac HTTP 存档 When the visitor logins with your website, your browser must request and some files to present the content. Each file sends an HTTP request to the server:

http request explanation -Source: wp rocket

[HTTP 请求解释 - 来源:WP Rocket [] 123] You embraceThe more resources, the more requests your browser needs. Optimize your image and reduce the size of the HTTP request, thereby speeding up the loading site.

Convert – Optimize the picture to increase the page speed for you Business income is very important. You need a fast loading website with light -colored images to satisfy your visitors, otherwise potential customers will leave before browsing. According to Google, if the page loading time exceeds 5 seconds, the probability of jumping will increase by 90%!

  • Jump rate and page speed -Source: Think with Google
We have watched it How to play an important role in the performance of the image. Let’s take a look at the impact of unaware images on Google PageSpeed \u200b\u200bInsights. 跳出率和页面速度 - 来源:Think with Google How does the picture affect Google PageSpeed \u200b\u200bInsights?
PageSpeed \u200b\u200bInsights is a tool provided by LightHouse, which can analyze the content on the webpage, including images. After the review is completed, PageSpeed \u200b\u200bwill give diagnosis and suggestions to optimize the image and make the page faster.

There are two and two: maximum content drawing (LCP), which is Google The core Web Vitals, and the first content drawing (FCP).

FCP and LCP -Source: PageSpeed \u200b\u200bInsights

FCP 和 LCP 受图像影响 - 来源:PageSpeed Insights
]

First Contentful Paint (FCP): It is related to the first text and image elements rendered on the screen.

Maximum content drawing (LCP): It label the point where the main content has been loaded.

If the first screen image takes time to load, Google may worsen these two KPIs.

More importantly, there are five types of common PageSpeed \u200b\u200brelated to picture optimization, which are:

1. The following format provides images

Google recommends converting images to the image to be converted into the image to Webp or AVIF, because these formats provide better compression than JPEG or PNG. Compressed images means faster , less data consumption and faster sites.

In the following example, by converting JPEG images into WebP, I can save nearly 135 kb :

得益于 WebP 或 AVIF 的潜在节省 - 来源:PSI Thanks to the potential savings of webp or AVIF -Source: PSI
2. Efficient Coding image

Effective encoding of images means reducing the size of the image file and still maintaining high quality. If the potential saves 4KB or larger, Google will mark the image as optimized.

近 25 KB 的潜在节省 - 来源:PSI The potential savings of nearly 25 kb -Source: PSI
3. Delay the departure image [ 123]
Another way to optimize images to improve performance is to delay the image outside the screen and apply the image to the image under the first screen (rather than the visitor’s screen). The goal is to first determine the priority of key resources, and then load the \”hidden\” image.

Delay loading is expected to save time: 5.4 seconds -Source: psi 延迟加载预计节省的加载时间:5.4 秒 - 来源:PSI 4. Appropriate appropriateness Another suggestion of the size of the image
another suggestion of Google is to adjust the picture size appropriately, especially when providing pictures (response design) on mobile devices. In the figure below, I can save 50 KB by adjusting the size of the image and optimized images for the mobile device.

After the image size is adjusted correctly Estimated loading time saves: 0.6 seconds -Source: PSI

5. Use effective cache strategy to serve static assets 正确调整图像大小后估计的加载时间节省:0.6 秒 - 来源:PSI HTTP cache can repeat your website when repeated access to your website Accelerate page loading time.Google will mark all unmatishing static resources:

You can pass the cache optimized transmission size -Source: PSI

可以通过缓存优化的传输大小 - 来源:PSI

]

In the next section, we will discuss how to handle each image PageSpeed \u200b\u200bInsights project and how to improve the speed of the page.

How to optimize images for Google PageSpeed \u200b\u200band Performance Optimization Images

  1. To optimize images for Google and increase page speed, you can implement the following 8 performance technologies:
  2. The image will be the image with the image. Converted to webp (or another next generation format)

  3. Compressed image

  4. Adjust the image size

  5. Set the image size

  6. to achieve delay loading

  7. Enable the browser cache

  8. Use CDN

Use .svg graphics as much as possible

Let us review each optimized network that can be used for Google recommended by Google Tools and plugins to improve your overall LightHouse score.

1. Convert the image to webp (or another next generation) [ [ 123] One of the most effective ways to optimize images for Google is to use WordPress plugins such as Imagify to convert them to webp. It creates a webp version of the image to achieve better compression and optimization. IMAGIFY provides up to 20MB of data for free each month. (View complete imagified pricing

).

使用 Imagify 将图像转换为 WebP
Use imagify to convert the image to webp

You can view other webp conversion plugins : WebP Converter for Media and Webp Express.

If you don’t want to use a plug -in, you will find many free online tools, such as Convertio or EZGIF. You need to perform some additional steps for this method: upload your image, them in WebP, and then put them in your WordPress library.

将 JPG 转换为 WebP 的基于 Web 的工具示例 - 来源:Convertio Convert jpg to a web -based tool example – Source: Convertio

2. Compressed image

Compressed image means significantly reduced its size to reduce its storage costs. According to Google, this will bring a good performance improvement to your website!

The most popular WordPress compressed image without loss of quality is:

Imagify (with level 3 compression: normal, radical, and large, can compress the image batch))

一键压缩图像 - 来源:Imagify One -click compressed image -Source: Imagify
Youpin [ 123]

Compressed JPEG and PNG (small PNG)

  • Wanwei.com
  • Short Pixel

  • Read our guide to understand 6 best for WordPress More information about image compression plug -ins.

  • You can also use design software such as Photoshop or Lightroom to compress the image, but please note that the quality may change.

The last choice is to use TinyPng -based tools.

Web tools used to compress images -source tinypng

3. Adjust the image size [123 123 ] Google recommends adjusting the image size appropriately, especially on mobile devices. You can use software such as Sketch, Preview, or GIMP to modify the size of images and reduce their weight.

Adjust the image size on Sketch

Note: You can also use imagify size. There is an option that automatically optimizes larger images.
Use Imagify to adjust the size of the larger image

4. Set the image size PageSpeed \u200b\u200bis recommended to set the clear width and height on the image element. The goal is to reduce the offset and improve the Cumulative Layout Shift (CLS) indicator, which is another Core Web Vitals indicator. It measures the visual stability of the content.

To set the image size, please ensure that your \”width\” and \”height\” HTML tags have a one. Value, as shown in the red below:

\u0026 lt;!-set a 640: 360 IE A 16: 9-aspect Ratio-\u0026 gt; \u0026 lt; img src \u003d \u0026 quot; girl.jpg \u0026 quot; width \u003d \u0026 quot; 640 \u0026 quot; height \u003d \u0026 quot; 360 \u0026 quot; alt \u003d \u0026 quot; girl at the beach \u0026 quot; /\u0026 gt; Whether the size is set to use the correct manual method to use the development personnel tools. Check your image:

Width and height setting-Source: chrome

   5. Implement delay loading [123 123 ] 

Delay loading is one of the most effective ways for GOOGLE and performance optimization images. Why? You tell the browser that only the image that the visitor is watching.

– Source: WP Rocket

To apply delay to your image, you can use free WordPress plug -in, such as Lazyload or AutopTimize of WP Rocket. Lazyload of WP Rocket is very simple:

Lazyload

You can also manually load manually by adding the following labels on the image:
\u0026 lt; img src \u003d \u0026 quot; image.png \u0026 quot; loading \u003d \u0026 quot; lazy \u0026 quot; alt \u003d \u0026 quot; … \u0026 quot; \u003d \u0026 quot; 200 \u0026 quot; height \u003d \u0026 quot; 200 \u0026 quot; \u0026 gt;

To understand more information about delay loading, we suggest you read this article about the best delay loading plug -in WordPress.

  6. Enable the browser cache  

Caches is another recommendation of Google’s page speed because it can provide users with images faster. The browser cache can help reduce the server load by reducing the number of HTTP requests per page.

Google recommends using WordPress plug -in to achieve cache. One of the best cache plugins is WP Rocket. It applies 80% of the best practice of Web performance, with simple interface and fast settings.

7. Using CDN

using the picture CDN can significantly reduce your traffic cost and increase your score on Google PageSpeed \u200b\u200bInsights. It optimizes the way to pass the image to the visitors, no matter where they are. Due to this image optimization technology, the amount of data transmitted has decreased.

Important Tips: Setting CDN from scratch may be overwhelmed. You need to process DNS records and CNAME fields. If you prefer to install it automatically, you may want to try RocketCDN. They complete the heavy work and configure CDN.

8. SVG graphics as much as possible

One of the most valuable features of SVG in terms of performance is that the graphic can be zoomed in without loss of quality. SVG represents Scalable Vector Graphics, which is based on XML. Behind the scenes, this format is equations and mathematics, making it easier to zoom without affecting pixels.

Image and page speed: Case Study

Let us apply all the recommended technologies we just mentioned so that we can compare the performance before and after web page optimization. We will use PageSpeed \u200b\u200bInsights and GTMETRIX for audit.

The first column shows the results of any type optimization. I used my iPhone to create a webpage containing 8 high -definition pictures.

The second column shows the improvement of the implementation of the image optimization technology.我在Google PageSpeed \u200b\u200bInsights 上的结果确实得到了改善:

图像优化之前

After the image optimization

[

[

[

123]

Page detail ]

Fixed PSI issues and warnings related to images

[ 123] (Imagify + WP Rocket + Rocket CDN) Total results [
[ [ [
Page Speed \u200b\u200bInsights 警告 [123 ]
The key performance results of the key performance results of Imagify, WProCket, and Rocketcdn:: After following Google’s suggestions on how to optimize images, we can notice the following improvements:

[

123] The total size of the picture is 3.5 MB, and now it has dropped to 36.8 kb

Half HTTP requests are issued by the image.

After the optimization, they are only responsible for 22%of the request.

  • HTTP requests dropped from 16 to 9
  • My Core Web Vitals are now in a green state
  • The performance level of the mobile terminal has increased from 68/100 to 95/ 100 The full load time is 3.9 seconds, and then it is reduced to 1.2 seconds My page size is almost 4MB, and now it is 91KB!
  • Packing up

  • In order to optimize the page speed and Google image, I applied the following performance protocol:

  • I installed Imagify, which allows me to allow me to allow me to allow me :
  • Convert my image toWebp

Adjust my biggest image size

Use Ultra mode compression and optimize my image to effectively encode it

    • I activated RocketCDN to allow my images to provide services faster globally.

    • I use WP Rocket:

    • to achieve the cache

  • Delayed loading of my image application

Optimize my JS and andCSS code

    • impact]
    • Want to try and get rid of the warning related to image?Use Imagify to start your image optimization trip!Before installing plugins, you can start using network applications for free.

Author:

Leave a Reply

Your email address will not be published. Required fields are marked *