Last updated: November 29, 2024

<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?dpl=dpl_G4M3RiQtx3dAhoWEFaDoowGHFzob)

**Kevin van Zonneveld**

Co-founder · Amsterdam, The Netherlands · Show bio

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

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 20k+ 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.

Your email:

Get access

## File uploading and encoding. Made simple.

Transloadit streamlines file handling for developers, trusted by brands like Coursera and The New York Times. We’re known for a reliable API, top-notch support, and a strong commitment to open source, with projects like [Uppy⁠](https://uppy.io) and [Tus⁠](https://tus.io) setting standards in file processing.

[Sign up](/c/)[Book a Demo](https://survey.typeform.com/to/kRg47Xi5)

No credit card needed

Cancel anytime
