Sunday, March 24, 2013

jsDelivr Official Blog: JPEG optimization tools benchmark

JPEG optimization tools benchmark: Intro I have a web project that hosts more than 15.000 images of various sizes from 300kb up to 10MB. In total these images take about 8GB of space. These images are served from a small VPS with 365MB of RAM and optimized LAMP stack with  Nginx as reverse proxy.
Since I am a performance freak, I want to speed up the image serving as much as possible.
But before tweaking any server settings I have to optimize the images themselves.
For this I started looking for linux JPEG optimization tools and found a few, no idea which one is the best so I decided to run a few benchmarks and share the results with the rest of you.

List of tools

jpegrescanA lossless jpeg optimization script written in Perl. Created in 2008 and hosted for a long time on a pastebin page it doesn't inspire a lot of confidence, but why not.

jpegtran - A popular tool for lossless jpeg optimization.

JPGCrush - Found only as a comment on hacker news without any documentation or info. Lets do this!

jpegoptim - Maybe the most popular tool for lossless and lossy image optimization


imgopt - A rather simple bash script that uses multiple tools at the same time to achieve maximum optimization