Jul 29, 2014 · Updated Sep 13, 2026

<span aria-hidden="true" id="enhanced-png-optimization-with-pngquant-integration"></span>

# Enhanced PNG optimization with Pngquant integration

![Kevin van Zonneveld](/assets/images/teammates/avatar-kvz-4.jpg)

**Kevin van Zonneveld**

Co-founder · Amsterdam, The Netherlands · Show bio

[](https://x.com/kvz)[](https://github.com/kvz)

> Update: this article describes the 2014 release. The `png_tool` parameter shown below was [removed in 2015](/blog/2015/11/image-optimization-improvements.md). For current integrations, use the [/image/optimize documentation](/docs/robots/image-optimize.md); `lossy: true` enables lossy PNG optimization. The historical example below is not valid with the current API.

A few customers have mentioned that our PNG optimization is sub-par. Even though we were already able to cut down the size of large PNGs by a factor of eight, these customers reported that dedicated services like [TinyPNG⁠](https://tinypng.com/) and [kraken.io⁠](https://kraken.io/) were giving even better results, especially for smaller images.

Obviously, if those services are able to achieve bigger savings, that is what we should be aiming for as well.

We began researching different tools and ended up with [pngquant⁠](https://pngquant.org/). Today, we are launching it as an extension to our existing [/image/optimize](/docs/robots/image-optimize.md) Robot. We are, however, not making pngquant the default, as that would not only break backwards compatibility, but also because this tool is not able to preserve metadata.

Preserving metadata is considered good internet citizenship, since it might contain copyrights. That is also why - if you choose to use `pngquant` - we make it mandatory to set the `preserve_meta_data` option to `false`, in addition to specifying the `png_tool`. We want to avoid people accidentally stripping ownership information from their files.

This is what a Step could look like in your Templates:

```javascript
optimize: {
  robot             : "/image/optimize",
  use               : ":original",
  preserve_meta_data: false,
  png_tool          : "pngquant"
}

```

As with all Robots, you can plug this Robot right on top of another one, like LEGO®. That will ensure that your video thumbnails, uploaded avatars, etc., are automatically stored in an optimized way.

After testing this new functionality with some of our customers, we were able to reach reductions of 65% for medium sized images, which is merely a few points away from services like TinyPNG and kraken.io.

[Simon⁠](https://twitter.com/powtac) from Yarnee had the following to say:

> With Yarnee you can create collections of media that otherwise would go lost in feed based services like Facebook. We were already using Transloadit's [/html/convert](/docs/robots/html-convert.md) Robot to capture previews, but in order to be accepted by Facebook, they had to be reduced in size. With Transloadit's new compression, we were able to get it to work beautifully!

We will, of course, continue optimizing to squeeze out those last few percents as well, but we already wanted to share the news with you today. 😄

Enjoy!

[#image-processing-service](/blog/tags/image-processing-service.md)[#image-optimize-robot](/blog/tags/image-optimize-robot.md)[#html-convert-robot](/blog/tags/html-convert-robot.md)

### Join 25k+ developers

Sign up for our [monthly newsletter](/newsletters.md) to receive direct links to 3 exclusive tech — and 2 product updates. No less, no more.

Email address

Subscribe

One email a month. Unsubscribe anytime.

## File uploading and encoding. Made simple.

Trusted by Coursera and The New York Times for a reliable API, top-notch support, and open source like [Uppy⁠](https://uppy.io) and [Tus⁠](https://tus.io).

[Try it free](/c/signup/)[Request a demo](/request-demo.md)

No credit card needed · Cancel anytime
