Mozilla Announces ‘mozjpeg’, Wants To Shrink Your JPEGs By 10%

A better, smaller JPEG

jpeg compression

jpeg compression

By Ibrahim.ID (Psarisomus dalhousiae - Kaeng Krachan.jpg) [CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0)], via Wikimedia Commons

Mozilla, the company behind Firefox, has announced a new project, designed to make the ubiquitous JPEG take up a little less space. Dubbed mozjpeg, it's a move to make JPEG images that are the same quality, take up less space, and are still compatible with the vast majority of platforms and decoders currently in use.

There have been other attempts to compress images without further quality degradation, such as JPEGMini and WebP, but these suffer from the drawback that they're not yet widely supported, whereas JPEG images will work on pretty much anything.

The first version of the mozjpeg project has already been released, and it uses an existing tool called "jpegcrush" to reduce filesizes by around another 10%. It's not new, but this does bring it to a far wider audience than might otherwise know about it:

What we’re releasing today, as version 1.0, is a fork of libjpeg-turbo with ‘jpgcrush’ functionality added. We noticed that people have been reducing JPEG file sizes using a perl script written by Loren Merritt called ‘jpgcrush’, references to which can be found on various forums around the Web. It losslessly reduces file sizes, typically by 2-6% for PNGs encoded to JPEG by IJG libjpeg, and 10% on average for a sample of 1500 JPEG files from Wikimedia. It does this by figuring out which progressive coding configuration uses the fewest bits. So far as we know, no production encoder has this functionality built in, so we added it as the first feature in ‘mozjpeg’.

10% might not seem like a lot, but if you're dealing with hundreds of images, it would add up. And this is only the very first release, hopefully future versions will do more and more to squeeze those JPEGs down, without losing any quality or compatability.

[via TNW]