The opportunity for web image optimization: an empirical study based on the July 1, 2011 HTTP Archive

Following my investigations of CSS and JavaScript minification, I applied a similar test methodology to study whether further image optimization could materially accelerate the page loading of a large sampling of websites.

Starting with the database from the HTTP Archive’s July 1, 2011 run, the experimental steps were:

  • Fetch, via HTTP, every PNG or JPEG URL listed in the archive.
  • Upon retrieving each image, attempt to reduce its size with a type-specific optimizer program:

From the test results, the median size reduction possible for image files in the July 1, 2011 HTTP Archive survey was:

  • 1.8% for PNG (sample size: 167,185)
  • 2.3% for JPEG (sample size: 372,131)

The following graphs show the full distribution for each image type.


The potential reduction in file size for the images in this study is relatively small when viewed as a percentage; compare the median reduction of 1.8% for JPEG and 2.3% for PNG to the median 10.4% for compressed JavaScript and 13.9% for compressed CSS:

However, it is important to note that images constitute a larger fraction of total page size than scripts or stylesheets. From the July 1, 2011 HTTP Archive stats, images comprise 482KB of the average page’s weight, compared to 135KB for scripts and just 28KB for CSS.

Leave a Reply