cwebp-bin

cwebp wrapper that makes it seamlessly available as a local dependency

MIT 28 个版本
安装
npm install cwebp-bin
yarn add cwebp-bin
pnpm add cwebp-bin
bun add cwebp-bin
README

cwebp-bin GitHub Actions Status

WebP is a new image format that provides lossless and lossy compression for images on the web. WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at equivalent SSIM index.

You probably want imagemin-webp instead.

Install

$ npm install cwebp-bin

Usage

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

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

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

CLI

$ npm install --global cwebp-bin
$ cwebp --help

License

MIT © Imagemin

版本列表
8.0.0 2022-05-06
7.0.1 2021-11-10
7.0.0 2021-10-23
6.1.2 2021-10-20
6.1.1 2020-05-30
6.1.0 2020-05-30
6.0.0 2020-05-29
5.1.0 2019-05-25
5.0.0 2018-11-30
4.0.0 2017-12-27
3.2.0 2016-07-08
3.1.0 2016-01-31
3.0.0 2015-04-27
2.0.5 2015-03-16
2.0.4 2015-01-26
2.0.2 2014-12-04
2.0.1 2014-11-24
2.0.0 2014-10-20
1.0.0 2014-09-07
0.1.8 2014-09-07
0.1.7 2014-09-05
0.1.6 2014-08-27
0.1.5 2014-08-22
0.1.4 2014-07-12
0.1.3 2014-06-09
0.1.2 2014-06-05
0.1.1 2014-06-05
0.1.0 2014-06-05