Mozilla has announced the availability of mozjpeg 2.0 via its research blog. We previously heard about this project to refine a "production-quality JPEG encoder" to offer better optimised images in March this year. Now the v2.0 fruits of that labour have landed and the codec is headlined as providing better file sizes, to the tune of 5 per cent on average, for both baseline and progressive JPEGs.
Back in March Mozilla told us that it had decided to start this project since "production JPEG encoders have largely been stagnant in terms of compression efficiency," since 1992, when this lossy image compression system became popular. It concluded, after much consultation with software engineers, that JPEG encoders had yet to reach their full compression potential and decided to develop a fork of libjpeg-turbo.
A typical Facebook gallery, hmmm tech and pizza...
mozjpeg 2.0 can save users on average of about 5 per cent on their JPG encoded files and it retains compatibility with the vast majority of decoders in current software. Mozilla also said that, depending on the type of image, you can see much greater compression improvements.
Mozilla detailed the specific improvements implemented in mozjpeg 2.0 to be the following:
- Trellis quantization, improving compression in both baseline and progressive JPG files with no reduction in compatibility
- Encoder now accepts JPEG files for re-compression
- Users can tune for PSNR, PSNR-HVS-M, SSIM, and MS-SSIM metrics
- Can be made to generate single DC scan for best compatibility
Facebook funding
We also heard that Facebook is already testing the new mozjpeg 2.0 encoding method. Stacy Kerkela, software engineering manager at Facebook said that "Facebook supports the work Mozilla has done in building a JPEG encoder that can create smaller JPEGs without compromising the visual quality of photos". The social network's support was also evident from a contribution of $60,000 to help develop this JPG encoder beyond its current state and onto mozjpeg 3.0. Obviously, to a web company as big as Facebook, making page load times shorter and serving five percent less data (in imagery) has the potential to reduce its operations costs.