OptiPNG is a PNG optimizer that recompresses image files to a smaller size, without losing any information.
$ npm install --save optipng-bin
var execFile = require('child_process').execFile;
var optipng = require('optipng-bin').path;
execFile(optipng, ['-out', 'output.png', 'input.png'], function (err) {
if (err) {
throw err;
}
console.log('Image minified!');
});
$ npm install --global optipng-bin
$ optipng --help
MIT © imagemin