zopflipng-chrissimpkins-bin
v2.1.1
Published
`zopflipng` wrapper that makes it seamlessly available as a local dependency (uses chrissimpkins' fork)
Downloads
4
Readme
zopflipng-chrissimpkins-bin
Like imagemin/zopflipng-bin, but uses a zopfli fork by @chrissimpkins instead of Google's version.
You probably want to install imagemin-crunch
instead (uses pngquant and this forked zopflipng to optimize images).
Installation
$ npm i zopflipng-chrissimpkins-bin
Usage
const {execFile} = require('child_process');
const zopflipng = require('zopflipng-chrissimpkins-bin');
execFile(zopflipng, ['-m', '--lossy_8bit', 'input.png', 'output.png'], () => {
console.log('Image minified!');
});
CLI
$ npm i -g zopflipng-bin
$ zopflipng --help