Search code examples
javascriptwebperformance-testingpagespeed

Page Speed Insights + Enable Compression vs Optimize images


I am using Page Speed Insights https://developers.google.com/speed/pagespeed/insights_extensions for analyzing the page load time of our web app. The results displayed both Enable Compression and Optimize Images as todo's under High Priority section. If I enable gzip compression on the web server , will it not take care of both ?

For Enable compression" Page speed says "Compressing resources with gzip or deflate can reduce the number of bytes sent over the network."

For Optimize images Page Speed says "Properly formatting and compressing images can save many bytes of data." and then gives suggestions like the following :

Losslessly compressing someImage.jpg could save 22.1KiB (95% reduction) and also provides a link to show the optimized content.

My question : isn't "Optimize Images " thing a subset of "Enable Compression" ?


Solution

  • My question : isn't "Optimize Images " thing a subset of "Enable Compression" ?

    No. Images are binary data. Even if apache compresses by gzip algorithm it's not what they are refereeing. You need to optimize your image by stripping all the meta data and comments from it. This will loose some bytes. And the original size of the image will be much lower.

    Here is the relevant tip from Yahoo.