

You will need to manually resize the image, but once again, don’t hesitate to add srcset and size attributes! You don’t need to specify which image to use on which density, the browser will do the maths. Same response: srcset and size attributes automatically deal with high density screens. The oversizing is still intentional and dedicated to high pixel density screens.You can handle this case by adding srcset and sizes attributes to your img tag. Think of a screen-wide image shown on a large screen for example. It is meant to keep a good image quality (not pixelated) when it is displayed larger. In the case of oversized images, there can be three reasons: The simplest way is to combine our current approach with Chrome Dev Tools’ built-in mobile simulator. Example: a 1000×1000 image should not weigh more than 800KB. This format keeps a neat image quality but is most of the time heavier. Same with this rule, but on PNG images and with a higher ratio. Example: if the loaded image is 1000×1000 pixels, its weight should not be more 1000*1000*0.3 = 300KB. This rule means that JPG images should not weigh more than 0.3 times the number of pixels in the image. Compression unoptimized-lossy-images *(0.3) It means that if your screen has a density of 2x (such as a Retina display), the browser will only complain if the loaded image is larger than 900×900. This rule takes in account higher density screens. Example: an image is displayed on 300×300 “CSS pixels” but the downloaded image is larger than 450×450, boom! It breaks the threshold and a gray rectangle shows up. This rule tells Chrome that an image dimensions should not exceed 1.5 times the number of physical pixels it is displayed on. Unoptimized-lossless-images *(0.8) Dimensions oversized-images *(1.5) 'none' Let’s review the three rules I suggested for your Feature-Policy header: oversized-images *(1.5) 'none' Click on the extension’s Pause button to disable it. Note: the HTTP header will stay enabled on every page you will visit later on.

#Neat image compression install
#Neat image compression update
I will update the post once it works back.Īll Webperf experts will tell you, one of the major performance issues on websites is image weight. Update: Chrome is re-working its Feature-Policy headers and the tips in this article are not working anymore.
