
Company News
Socket Has Acquired Secure Annex
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.
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 4 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.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.

Research
/Security News
Socket is tracking cloned Open VSX extensions tied to GlassWorm, with several updated from benign-looking sleepers into malware delivery vehicles.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.