简体   繁体   English

Google PageSpeed Insights优化了图像的压缩和调整大小

[英]Google PageSpeed Insights Optimize Images Compressing and Resizing

Google PageSpeed Insights is saying that I should compress and resize several images. Google PageSpeed Insights表示我应该压缩并调整几个图像的大小。

Here's an example: 这是一个例子:

在此处输入图片说明

I saved this image using Photoshop's Save for Web JPEG High preset: 我使用Photoshop的“ Web JPEG高保存”预设保存了此图像:

在此处输入图片说明

What can I do to this image to avoid Google's "compress and resize" warning? 我如何处理这张图片,以避免Google出现“压缩和调整大小”警告?

This is what works for me and JPEG to be on the safe side of PageSpeed Insights. 这对我和JPEG来说都是行之有效的,因为它是PageSpeed Insights的安全方面。

File > Save for Web & Devices 文件>保存用于Web和设备

在此处输入图片说明

Not only do you need to find the right compression settings but also you need to stick to your img tag actual dimension. 您不仅需要找到正确的压缩设置,还需要坚持img标签的实际尺寸。 If you know your max width for img tag will be 555 px then save your JPEG to that dimension, not a pixel more ... as for how it goes along with retina display, it seems Google does not take this criteria in account right now. 如果您知道img标签的最大宽度为555像素,然后将JPEG保存为该尺寸,而不是再增加一个像素...至于其与视网膜显示的配合情况,看来Google目前未考虑此标准。

If you are not happy with the resulting quality (and you might be if you have a designer ecommerce site) you need to bypass Google recommendation - knowing it could slightly penalize your SEO over someone else that actually stick to the rule. 如果您对最终的质量不满意(如果您拥有设计师电子商务网站,则可能会感到满意),则需要绕过Google的建议-知道它可能会对您的SEO稍有不利于实际上坚持这一规则的其他人。

Due to the small number of different colours that image seems to have, you'd probably get a much smaller image if you exported it as a gif, or png-8. 由于图像似乎只有少量的不同颜色,如果将其导出为gif或png-8,则可能会得到较小的图像。 Sitepoint has a useful article on when to choose which image format . Sitepoint上有一篇有关何时选择哪种图像格式的有用文章

You don't mention if you are using the Chrome extension or the main website? 您没有提到使用的是Chrome扩展程序还是主要网站? Assuming the former you can actually download the optimised version of an image by clicking the 'See optimised content' link under 'Suggestions for this page'. 假设是前者,您实际上可以通过单击“此页面的建议”下的“查看优化的内容”链接来下载图像的优化版本。

Img here: 在这里:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google PageSpeed Insights-图像压缩过多 - Google PageSpeed Insights - Too much compressing on images 使用Google PageSpeed Insights和Apache mod_pagespeed进行图像优化 - Image Optimization Using Google PageSpeed Insights and Apache mod_pagespeed 如何为 SEO 和 Google 的 Pagespeed 优化图像并改进网络节省 - How to optimize images for SEO & Google's Pagespeed & Improve web-saving Google Page Insights:有人用Google所建议的无损压缩来优化图像吗? - Google Page Insights: did anybody ever optimize images with lossless compression by the amount Google suggests? 像Google的PageSpeed Insights一样无损地压缩图像 - Losslessly compress image as much as Google's PageSpeed Insights WordPress-页面见解-优化移动图像 - Wordpress - page insights- Optimize images for mobile 为什么Google PageSpeed抱怨Retina图片? - Why is Google PageSpeed complaining about Retina images? 使用PageSpeed进行图像优化 - Image Optimize using PageSpeed 照片调整大小和压缩 - Photo resizing and compressing 压缩现有pdf中的图像会使生成的PDF文件更大(Lowagies调整大小方法和实际压缩方法) - Compressing images in existing pdfs makes the resulting PDF file bigger (Lowagies resizing method and real compression method)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM