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
MIT © Imagemin