dwebp-bin

2.0.1 • Public • Published

dwebp-bin GitHub Actions Status

WebP is a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP, webmasters and web developers can create smaller, richer images that make the web faster.

Install

$ npm install dwebp-bin

WebP requires following libraries on Linux. See detail.

$ sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev

Usage

import {execFile} from 'node:child_process';
import dwebp from 'dwebp-bin';

execFile(dwebp, ['input.webp', '-o', 'output.png'], error => {
  if (error) {
    throw error;
  }

  console.log('Image is converted!');
});

CLI

$ npm install --global dwebp-bin
$ dwebp input.webp -o output.png

License

MIT © Shogo Sensui

Package Sidebar

Install

npm i dwebp-bin

Weekly Downloads

18

Version

2.0.1

License

MIT

Unpacked Size

4.04 MB

Total Files

7

Last publish

Collaborators

  • 1000ch