---
title: "pngquant versus optipng and pngcrush, a PNG benchmark"
language: en
topics: ["cloud", "data", "howto", "networking", "programming", "server", "web", "webdesign", "work"]
full_article_url: https://willem.com/en/2018-09-26_optimising-images-for-the-web-and-performance/
---
# pngquant versus optipng and pngcrush, a PNG benchmark

*Measured file sizes and timings on real server hardware.*

> pngquant won my 2018 benchmark by a wide margin: it shrank a 2897KB test image to 744KB in 5.2 seconds, where optipng and pngcrush needed minutes to reach only 2510KB. It is lossy, but I could not see the difference.

The test ran on a quad-core Intel Xeon server with 8GB RAM, using a heavy 2897KB test image with mixed content (photo, text and solid colours), standing in for the thousands of PowerPoint slides one customer site serves as PNG.
optipng at its extreme -o7 setting reached 2510KB in 2 minutes 36 seconds, its defaults 2536KB in 4.9 seconds. pngcrush -brute also reached 2510KB, in 1 minute 42 seconds, defaults 2531KB in 9.2 seconds. pngquant produced 744KB in 5.2 seconds at its extreme setting and 746KB in 4.2 seconds by default.
pngquant uses a different, lossy algorithm, so a little quality is traded away, but comparing closely I could not spot the difference. For automated server-side optimisation it was the clear choice.
