A small node.js library for converting any image to webp file format or converting webp image to any image file format.
This library uses precompiled executables of WebP for more info visit WebP.
- Precompiled executables of WebP upgraded to v1.0.2
- Promise-based structure
yarn add github:stickerum/webp-converter
const webp = require('webp-converter');
webp.cwebp('input.jpg', 'output.webp', '-q 80')
.then(console.log)
.catch(console.error);
const webp = require('webp-converter');
webp.dwebp('output.webp', 'input.png')
.then(console.log)
.catch(console.error);