This rule is triggered when PageSpeed Insights detects that a picture on a Web page can be optimized to reduce its size without significantly affecting its visual effect.
You should perform basic and advanced optimizations for all pictures. Basic optimizations include cropping unnecessary areas, reducing color depth to the lowest acceptable level, removing picture comments, and saving pictures in the appropriate format. You can use any picture editing program (for example,GIMP). Advanced optimizations include further compression (lossless compression) of JPEG and PNG files.
Using the Picture Compression Tool
There are many tools available for further lossless compression of JPEG and PNG files without any impact on image quality. For JPEG files, we recommend that you use thejpegtran或jpegoptim(Linux only; Use--strip-all
选项运行)。对于PNG文件,我们建议使用OptiPNG或PNGOUT.
Choose the appropriate picture file format
您应测试一下哪种格式最适合您的图片,尽管我们在下面推荐了一些较高级别的格式:
Except as other written, the content of this page is licensed under theCreative Commons Attribution 3.0 License, and code samples are licensed under theApache 2.0 License. For details, see our Site Policies.