libwebp-static v1.0.1
static libwebp binaries
Static libwebp binaries for macOS, Linux, Windows.
Provides precompiled static binaries for all tools of the libwebp library.
anim_diff
, anim_dump
, cwebp
, dwebp
, get_disto
, gif2webp
, img2webp
, vwebp
, webpinfo
, webpmux
, webp_quality
Supports macOS (64-bit and arm64), Linux (64-bit, arm64), Windows (64-bit).
Sources of the binaries
The binaries download script downloads binaries from these locations:
The script extracts build information and (when possible) the license file from the downloaded package or the distribution server. Please consult the official WebP project for exact source versions.
Installation
Install via npm:
npm install libwebp-static
Usage
This package provides paths to the static cwebp
and dwebp
binaries, so they can be used in your Node.js applications:
const { cwebp, dwebp } = require("libwebp-static");
const { execFileSync } = require("child_process");
execFileSync(cwebp, ["input.png", "-o", "output.webp"]);
console.log("Image converted to WebP!");
Building the project
The unzip
, tar
CLI executables need to be installed. On macOS, use brew install gnu-tar xz
.
License
This project is licensed under the GPL-3.0 License.
The included WebP binaries are provided by Google and are subject to their own licensing terms. For more details, see the WebP licensing information.