1.0.0 • Published 5 months ago
png-to-webp-cli v1.0.0
// 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-cli
This 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:
png2webp
Convert with 90% quality:
png2webp --quality 90
Convert and delete original PNG files:
png2webp --delete
Convert files in a specific directory:
png2webp --path ~/Documents/images
License
MIT
1.0.0
5 months ago