Mozilla Launches Project to Make Lighter JPEG Images on the Web

Time passes, technology evolves, but some problems remain the same. This is the case of the images for the web: increasingly they are responsible for the “weight” of the sites. To alleviate this situation, Mozilla has just released the mozjpeg, a project to make lighter JPEG images, but without changing its quality.

Concern about the size of the images does not come today. In 2010, Google launched the format WebP just to try to lessen the impact of traffic of this type of content on the Internet. The webp is similar to the JPEG but using a compression technique that can result in images up to 34% smaller than the latter.

The format delivers what it promises and is able even to support animations and transparent background, combining the advantages of JPEG, GIF and PNG, but stumbles on the compatibility factor: only browsers Chrome (obvious) and Opera support WebP natively and, in relation to image editors, most still require plug -in to work with content type.

Mozilla does not rule out the possibility of taking the WebP for Firefox, but as the JPEG is the most popular Internet image, its developers believe that optimize the format of compression is the initiative that will bring more tangible results.

This is exactly what the mozjpeg intends to do. In his statement , Mozilla said that after talks with a number of software engineers, the organization came to the conclusion that the JPEG has not yet reached its compression potential, even though more than 20 years of existence. This perception is that was the trigger for the project.

There is nothing very new in fact. What mozjpeg do is implement a fork of jpgcrush, a Perl script written by Loren Merritt developer that has been widely used to compress images. This progressive encoding algorithm checks which configuration makes the image occupying less bits lossless manner, i.e., without losing quality.

In the Mozilla testing, jpgcrush able to reduce PNG images in 2% to 6% and in the case of JPEG, at 10%, which made the organization consider it the best encoder currently available lossless. With mozjpeg, is expected to make it even more efficient.

If you are willing to test it on some project, mozjpeg 1.0 is now available on GitHub. More details can be found in this mailing list.