image-to-webp
Version:
A NodeJS Package to convert JPG, PNG images to WebP
13 lines (11 loc) • 337 B
JavaScript
const convertToWebp = require("./src/convert-to-webp");
module.exports = convertToWebp;
// // Example:
// (async function(){
// try {
// const outputFile = await convertToWebp.imageToWebp("./myimg.jpeg",90);
// console.log(outputFile);
// } catch (error) {
// console.error(error);
// }
// })();