@porky-prince/optipng-bin
v7.0.2
Published
OptiPNG wrapper that makes it seamlessly available as a local dependency
Downloads
4
Maintainers
Readme
optipng-bin
OptiPNG is a PNG optimizer that recompresses image files to a smaller size, without losing any information
You probably want imagemin-optipng
instead.
use https://npm.taobao.org/mirrors/optipng-bin/ as downlaod source
Install
$ npm install --save optipng-bin
Usage
const {promisify} = require('util');
const {execFile} = require('child_process');
const optipng = require('optipng-bin');
const execFileP = promsify(execFile);
(async () => {
await execFile(optipng, ['-out', 'output.png', 'input.png']);
console.log('Image minified!');
})();
CLI
$ npm install --global optipng-bin
$ optipng --help