png-to-webp-cli
v1.0.0
Published
CLI tool to recursively convert PNG files to WebP format
Downloads
10
Readme
// File: README.md
png-to-webp-cli
A command-line tool to recursively convert PNG files to WebP format.
Installation
npm install -g png-to-webp-cliThis tool requires cwebp to be installed on your system:
- macOS:
brew install webp - Ubuntu/Debian:
sudo apt-get install webp
Usage
png2webp [options]Options
-q, --quality <number>: WebP quality (0-100) [default: 80]-d, --delete: Delete original PNG files after conversion-r, --recursive: Search recursively through subdirectories [default: true]-p, --path <path>: Path to search for PNG files [default: current directory]-v, --version: Output the version number-h, --help: Display help for command
Examples
Convert all PNG files in the current directory and subdirectories:
png2webpConvert with 90% quality:
png2webp --quality 90Convert and delete original PNG files:
png2webp --deleteConvert files in a specific directory:
png2webp --path ~/Documents/imagesLicense
MIT
