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.
Specify binary base url
Provide ability to locally mirror cwebp-bin binaries for various versions and platforms.
- Environment Variable
$ CWEBP_BINARY_SITE=https://npm.taobao.org/mirrors/cwebp-bin yarn install
- npm config variable
$ echo "cwebp_binary_site=https://npm.taobao.org/mirrors/cwebp-bin" >> .npmrc
Install
$ npm install cwebp-bin
Usage
const execFile = ;const cwebp = ; ;
CLI
$ npm install --global cwebp-bin
$ cwebp --help
License
MIT © Imagemin