
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
image-to-webp
Advanced tools
Convert Image (JPG/PNG) to WebP for good compression and better performance. Resulting in faster website load.
https://www.npmjs.com/package/image-to-webp
npm i image-to-webp
const { imageToWebp } = require("image-to-webp");
const outputFilePath = await imageToWebp("./myimg.jpeg",90);
console.log(outputFilePath);
imagePath: provide string image path here, you can provide the temporary uploaded image path which is returned by packages like Formidable or Multer.
quality: it accept number value from 0-100, 0 (For high compression and lossy image), 100 (Less compression). Defult value is 80.
imageToWebp()
function returns the path of Converted WebP image. this package stores all images to temporary folder. so using returned path by this method, either you can move the image from tmp
directory to public directory in your backend or upload it to any cloud storage provider such as AWS S3.
FAQs
A NodeJS Package to convert JPG, PNG images to WebP
The npm package image-to-webp receives a total of 6 weekly downloads. As such, image-to-webp popularity was classified as not popular.
We found that image-to-webp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.