@mole-inc/cwebp-bin
v9.0.5
Published
cwebp wrapper that makes it seamlessly
Downloads
101
Maintainers
Readme
cwebp-bin
WebP is a new image format that provides lossless and lossy compression for images on the web. WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at equivalent SSIM index.
You probably want imagemin-webp
instead.
Install
$ npm install @mole-inc/cwebp-bin
Usage
import {execFile} from 'child_process';
import {cwebpBin} from '@mole-inc/cwebp-bin';
execFile(cwebpBin.path, ['input.png', '-o', 'output.webp'], err => {
if (err) {
throw err;
}
console.log('Image is converted!');
});
CLI
$ npm install --global @mole-inc/cwebp-bin
$ cwebp --help
License
This is a fork of imagemin/cwebp-bin licensed under the MIT License.
see license file and vendor/cwebp-license.txt file.