How to effectively encode images on WordPress and fix the PageSpeed warning

If you review your WordPress website through PageSpeed \u200b\u200bInsights, Lighthouse may suggest that you use images on images Perform effective codes. PageSpeed \u200b\u200bInsights (PSI) is a tool for generating performance reports for the entire WordPress page. If it detects that your image can be better optimized, the \”effective encoding image\” warning will be triggered.

“高效编码图像”问题 - 来源:PageSpeed Insights “高效编码图像”问题– 来源:PageSpeed \u200b\u200bInsights

在本指南中,我们The meaning of effective encoding images and

check the status of the image. This is also an effective way to improve the performance score of LightHouse. We also shared 6 image optimization technologies and fixing the \”efficient encoding image\” warning .

Let’s sneak in!

What does it mean effective encoding images?

Efficient encoding images means optimizing images to reduce file size without significantly affecting its quality.

How does lighthouse mark the image as optimized? What trigger this problem?

LightHouse scan all the images on the page you are reviewed, and then set the compression level to 85%. If the potential saves 4 KIB or larger, they will report the image and mark it as an error in your performance report.

图像被 Lighthouse 标记,因为潜在节省优于 4B (24.6KiB) 图像被Lighthouse 标记,因为潜在节省优于4B (24.6KiB)
[123 ]
Unprecedented images with high quality usually lead to large files. The larger the picture, the more time to and present it to the visitors. When you
all

images occur, the total loading time may increase, and you may eventually encounter a slow website.

Avoid this situation, we share 6 optimization technologies for you to provide images correctly on the Internet. 在WordPress 上有效编码图像的6 种方法:

您可以采取六个步骤来有效编码图像并处理此PageSpeed \u200b\u200bInsight 建议,包括:

[123 ] Compressed image

Implement delay loading

Convert the image to a webp (next generation format)

  1. Provides the correct size image
  2. Use the picture CDN
  3. ]

  4. Use video instead of animation GIF
  5. Let us review each step.

  6. 1. Compress your picture

  7. The goal of image compression is to reduce the image file without sacrificing too much quality. This makes Pagespeed Insights very happy, because the image can be stored and presented in the most effective form, so that they can be coded correctly. If you don’t want to touch image quality, image compression may be damaged but lost.

However, if you use the correct tool, non -damaged compression is not visible to the naked eye. In the example below, one is the original file and the other is compressed. Can you see the difference? I can not.

Please remember that the secondary image will significantly affect your page speed and slow down your WordPress website. The easiest way to avoid any performance problems is to use WordPress plug -in. do not worry. We have completed a heavy work for you, and we have summarized the list of best image compression plug -in of WordPress. If you prefer to manually compress the image, we will also serve you. If you feel at a loss for Photoshop and Lightroom, you can use many replacement optimization tools. 2. Implementing delay loading

Delay loading can help effectively encode the image, because it is a optimization technology that is designed to display images only when it is needed. If the user views them, the image will be presented by the browser. Otherwise, delay loading to prioritize the most critical content. Google recommends using the \”delayed screen image\” on PageSpeed, which means that the following delayed loading script:

[12] [12] [12] [12] [12] [12] [12] [12] [12] [12] [12] [12] [12] [12]3]

\”loading \u003d lazy\” Please remember, you should avoid setting this for any image in the first visible view port. script. Instead, the content of the content under the first screen is delayed:

   The content of the content of the first screen is delayed 

If you don’t want to manually implement delay loading, you can use free WordPress plug -in, such as Lazy Load of WP Rocket or viewing the best delay loading plug -in of WordPress. 3. Convert the image to a webp (next generation format) 对首屏下的内容应用延迟加载 WebP developed by Google is a next -generation image format that can provide better loss and damage compression for images. This can better encode the image on the WordPress website and pass the PAGESPEED review.
In fact, according to GOOGLE, \”the average size of the webp file is 25%-34%compared with the size of the JPEG file.\” The following table shows that webp has achieved better compression than JPEG formats:

Webp -Source: GreenSpector Are you convinced? Imagify plug -in can convert your image from WordPress instrument board to webp.

If you want to know more information about this next -generation format, we recommend that you read how to use the webp format on WordPress. 4. Provide the correct size image 文件大小更小的 WebP - 来源:Greenspector LightHouse allows you to easily find pictures of incorrect size on your WordPress website. Just review your page, if you find the \”correct size image\” warning, you should adjust their size.
Devtools Elements panel can also be used to check the display size of the image:

Ident my image in the \”Element\” tab Size-Source: DEVTools

This part sounds simple, but in view of the various screen size available in 2022, things will soon become complicated.

在“元素”选项卡中识别我的图像大小 - 来源:DevTools
A rule: Ideally, your page should not provide more than the user screen more than the user screen Big image.

The average desktop screen size is 1920 x 1080 pixels

The width of most mobile phones is 400 PX For your WordPress website You can upload pictures on your page through the media library or directly. Google recommends to ensure that the best image size (including the image size used to respond to the breakpoint). The key is to avoid using full -size images and correctly adjust their size:

Try to keep the image file size below 200 kb

For most images, the maximum width is 800 pixels. Enough

  • Making images between these numbers will ensure that they are quickly loaded on the user’s device.
  • You can further optimize your image according to each device, as shown in the figure below:

  • Apple device size-Source: SKETCH SOFTWARE

You have a lot ]

Tools such as Photoshop, Lightroom, GIMP and other tools are manually completed. Apple 设备尺寸 - 来源:Sketch Software Use image optimization plugins like imagify. Similar to compression, you can also use the size of all the existing images on the batch adjustment site:

Correctly adjust my image size – Source: imagify

5. Use the picture CDN to effectively encode the image on WordPress, you should choose a CDN provider. It will provide your image faster and help get rid of questions related to the Google PageSpeed \u200b\u200bimage. CDN focuses on optimization and delivery of images, no matter where your user is in the world:

  • +50 edges to deliver the image faster to the image – Source: RocketCDN

According to WebDev’s from webdev Saying, \”Switch to the image CDN can save 40-80% of the image file size\”, as shown below: 正确调整我的图像大小 - 来源:Imagify

Switch to the number of image bytes saved after CDN -Source: Google Chrome developer

6. Use video instead of animation GIF

Use video to replace the animation GIF will improve performance, because .mp4 video is much lighter than GIF, as shown in the following example:

– GIF file size: 12 MB -MP4 file size: 286 kb ( Total savings: 98%)

GIF and MP4 files Size PAGESPED also recommends videos format instead of using GIF to provide your animation content. When converting the content to MP4, make sure that the setting is correct so that it looks like GIF:
– It should be continuously circulated
-The should be played automatically
– It should be silent

There are many ways to convert GIF into videos, and I use EZGIF to compare the above.

Now we have already understood the six optimization technologies of efficiently coding images on WordPress, let me and You share my performance toolbox. If you need to improve the speed of the WordPress website and ensure that your image is optimized well for the network, it will be useful.

My toolbox is used to keep image optimization and always pass the PageSpeed \u200b\u200bInsights review (including effective encoding images):

– Imagify, used to compress my images and provide them to WebP (20 MB of images per month)
– WP RockeT delayed loading (free)

– RocketCDN is used to deliver my image faster (unlimited bandwidth is only 8.99 US dollars/month)

– EZGIF (convert .gif to a free tool for .mp4) [123 ] – WP Rocket, one of the best plug -ins, just click a few times to improve the speed (make the Core Web Vitals green) below In a section, we will focus on Imagify, which is our powerful image compressed plug -in, which can effectively encode the image.

How to use imagify to repair effectively encoding the image

Demonstration site with high -definition images

Thank you imagified, you can be in the When not affecting quality, compress the image and repair the \”effective encoding image\” warning. It is time to see the actual application of Imagify, and compares and uses and does not use Imagify PageSpeed \u200b\u200binsights.

] Before imagining -my performance on PageSpeed \u200b\u200bInsights

LightHouse did not give any good results. I encountered some problems related to images, namely:

Effective encoding image (This is our theme today)
The following format provides images

Image of appropriate size

]

  • The problem of labeled by lightHouse (before the optimization Our images, appropriately adjust their size, of course, and also effectively encode them.
  • Use the performance results on the use of Imagify -PageSpeed \u200b\u200bInsights

  • Imagify has fixed the \”effective encoding image\” warning! It also optimized all my images and put my previous questions in the audit area passed:
Lighthouse 标记的问题(在 Imagify 优化之前) Images using imagified correctly (passed) -Source: PSI
IMAGIFY reduced my image file size by 90%

– It it From nearly 2 MB to 200 KB, as shown in the following example:

Imagine optimizing my image and saving nearly 90% of the file size [123 ]

Do you want to get rid of the \”effective security image\” warning?

Install imagify and apply the following settings: 使用 Imagify 正确编码的图像(通过审核) - 来源:PSI
Set imagify (very simple)
Select the level of optimization to compress images. I chose Ultra of the highest optimization level:

Select the super -optimized level -Source: Imagify

Convert your image to webp, which is the next generation format recommended by PageSpeed \u200b\u200bInsights:

Webp one Key conversion -Source: imagify

  • Use Imagify batch to optimize your big images. (

This means one -click optimization of the entire library!)

In this way, the PSI warning disappeared.
It is worth mentioning that this image optimization process is completely free!
    The free version of Imagify allows you to adjust and compress the image size of 20 MB every month. If you intend to add more images, you can choose the following high -level pricing:

500 GB (about 5,000 images) $ 4.99 per month

$ 9.99 per month, unlimited use. 一键转换 WebP - 来源:Imagify If you still have doubts, PageSpeed \u200b\u200bInsights also recommends using image optimization plugins like Imagify:
  • psi PSI Recommended Imagify plug -in as a solution for effective encoding images
  • Packing up

  • If there is no Imagify, PAGESPEED will mark a few problems for my image:

My website does not have imagified -Source: PSI

  • When using imagify, all the issues related to images have been fixed.They optimized in the next generation format (WebP), and my \”effective coding image\” warned finally turned green.

My website passed the audit of imagify If you are like me and want to pass throughClick a few times to effectively encode the image in WordPress, so why not use Imagify?You can try Imagify freely like me, optimize your image and run your own review on PageSpeed Insights.If you also thanked Imagify for passing the test, please tell me in the comments, I am curious!
Author:

Leave a Reply

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