guetzli-bin
Guetzli is a JPEG encoder that aims for excellent compression density at high visual quality. Guetzli-generated images are typically 20-30% smaller than images of equivalent quality generated by libjpeg.
You probably want imagemin-guetzli
instead.
Install
$ npm install guetzli
Downloading From a Custom Source
By default, this package will download guetzli from GitHub. To use a custom source, set the npm config property imagemin_local_url
. The downloader will append /<name>/<version>/vendor/<dist>
.
$ npm install guetzli --imagemin_local_url=https://mymirror.local/path
Or add property into your .npmrc
file(https://docs.npmjs.com/files/npmrc)
imagemin_local_url=https://mymirror.local/path
Another option is to use the environment variable IMAGEMIN_LOCAL_URL
.
$ IMAGEMIN_LOCAL_URL=https://mymirror.local/path npm install guetzli
Usage
const {execFile} = require('child_process');
const guetzli = require('guetzli');
execFile(guetzli, ['input.jpg', 'output.jpg'], error => {
console.log('Image minified!');
});
CLI
$ npm install --global guetzli
$ guetzli --help
License
MIT © Imagemin