Skip to content
pngquant bin-wrapper that makes it seamlessly available as a local dependency
Branch: master
Clone or download
Latest commit 4db8e0b Feb 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
fixtures Meta tweaks Sep 21, 2017
lib Use instead of for binaries (#… Feb 20, 2019
vendor Update pngquant source to 2.12.0 Jul 19, 2018
.editorconfig Require Node.js 6 Jul 19, 2018
.gitattributes Require Node.js 6 Jul 19, 2018
.gitignore Remove network request for pngquant src (#80) Jul 19, 2018
.npmrc Bump `execa` Mar 15, 2018
cli.js Meta tweaks Sep 21, 2017
index.js Meta tweaks Mar 29, 2017
license Meta tweaks Sep 21, 2017
package.json 5.0.2 Feb 20, 2019 Replace Linux binaries with statically linked versions (#76) Jul 19, 2018
test.js fixes #90 (update bin-wrapper to 4.0.1) (#95) Oct 31, 2018

pngquant-bin Build Status

pngquant is a PNG compressor that significantly reduces file sizes by converting images to a more efficient 8-bit PNG format

You probably want imagemin-pngquant instead.


$ npm install pngquant-bin


const execFile = require('child_process').execFile;
const pngquant = require('pngquant-bin');

execFile(pngquant, ['-o', 'output.png', 'input.png'], err => {
	console.log('Image minified!');


$ npm install --global pngquant-bin
$ pngquant --help

Updating pre-compiled binaries

The Linux binaries are statically linked so they should work on all Linux distributions. To recompile them:

  1. sudo apt-get install libpng-dev
  2. ./configure CFLAGS=-static && make && cp pngquant pngquant-64
  3. Repeat the above commands, but in a 32-bin docker container started with: docker run -ti -v pwd:/source i386/debian:9.3 bash


MIT © Imagemin

You can’t perform that action at this time.