Mozilla works to squeeze more life out of JPEG

The Firefox developer releases a tool called mozjpeg that cuts image file sizes by about 10 percent through judicious optimization. The goal: a faster Web.

Firefox logo

JPEG, the decades-old image format, shows no signs of disappearing. That's why Mozilla announced a project Wednesday to try to shave another 10 percent off images compressed with the standard.

The non-profit organization behind Firefox announced a project called mozjpeg that aims to compress JPEGs more intelligently. Smaller file sizes means Web pages load faster, and Mozilla is deeply interested in improving the Web's performance.

"Photos can easily make up the bulk of the network traffic for a page load," said senior technology strategist Josh Aas in a blog post. "Reducing the size of these files is an obvious goal for optimization."

It's a tweak of an existing open-source tool called libjpeg-turbo that's used to create JPEGs. On top of that it adds a tool called jpgcrush that picks the best compression options without sacrificing any image quality.

Mozilla's tests show the encoder squeezes 10 percent off a sample of 1,500 images on Wikimedia. It also can improve on PNG images, typically shrinking file sizes by 2 to 6 percent.

Google, too, has been trying to speed up the Web with a variety of methods including an entirely new graphics format called WebP. Companies including Facebook are big WebP fans, but Mozilla so far isn't on board.

"We are not convinced that WebP is 40 percent better than JPEG," spokesman Justin O'Kelly said, referring to Mozilla's 2013 analysis of WebP.

Aas said image compression could improve substantially one way or another, but even so, JPEG will remain widely used and therefore be worth improving:

Production JPEG encoders have largely been stagnant in terms of compression efficiency, so replacing JPEG with something better has been a frequent topic of discussion. The major downside to moving away from JPEG is that it would require going through a multi-year period of relatively poor compatibility with the world's deployed software. We (at Mozilla) don't doubt that algorithmic improvements will make this worthwhile at some point, possibly soon. Even after a transition begins in earnest though, JPEG will continue to be used widely.

The mozjpeg software is at version 1.0 now, but more changes are likely -- for example the incorporation of an approach called Trellis quantization.

About the author

Stephen Shankland has been a reporter at CNET since 1998 and covers browsers, Web development, digital photography and new technology. In the past he has been CNET's beat reporter for Google, Yahoo, Linux, open-source software, servers and supercomputers. He has a soft spot in his heart for standards groups and I/O interfaces.

 

Join the discussion

Conversation powered by Livefyre

Don't Miss
Hot Products
Trending on CNET

Last-minute gift ideas

Under pressure? These will deliver on time

With plenty of top-notch retailers offering digital gifts, you still have time to salvage your gift-giving reputation.