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
選項(xiàng)運(yùn)行)。對(duì)于PNG文件,我們建議使用OptiPNG或PNGOUT.
Choose the appropriate picture file format
您應(yīng)測(cè)試一下哪種格式最適合您的圖片,盡管我們?cè)谙旅嫱扑]了一些較高級(jí)別的格式:
?
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.