advpng-bin

advpng wrapper that makes it seamlessly available as a local dependency

advpng-bin

The main purpose of this utility is to recompress png files to get the smallest possible size

$ npm install --save advpng-bin
var advpng = require('advpng-bin').path;
var execFile = require('child_process').execFile;
 
execFile(advpng, ['--recompress', '--shrink-extra', 'image.png'], function (err) {
    if (err) {
        throw err;
    }
 
    console.log('Image minified!');
});
$ npm install --global advpng-bin
$ advpng --help

MIT © imagemin