cwebp wrapper that makes it seamlessly available as a local dependency
npm install cwebp-bin-coding-net-vendorimagemin-webp instead.
$ npm install cwebp-bin
`
Usage
`js
const {execFile} = require('child_process');
const cwebp = require('cwebp-bin');
execFile(cwebp, ['input.png', '-o', 'output.webp'], err => {
if (err) {
throw err;
}
console.log('Image is converted!');
});
`
CLI
`
$ npm install --global cwebp-bin
`
`
$ cwebp --help
``