curl --proto '=https' --tlsv1.2 -LsSf https://github.com/probablynotval/webptimizer/releases/download/v0.1.0/webptimize-installer.sh | sh
powershell -c "irm https://github.com/probablynotval/webptimizer/releases/download/v0.1.0/webptimize-installer.ps1 | iex"
Supported Rust versions >= 1.79.0
git clone https://github.com/probablynotval/webptimizer.git
cd webptimizer
cargo build --release
To convert a directory simply run:
webptimize convert /path/to/dir
Note: should work on Windows
Optionally you can specify the output directory and quality:
webptimize convert /path/to/dir /path/to/dir/webptimized -q 69
If for some reason you wish to convert losslessly it can be done using the -l flag:
webptimize convert /path/to/dir /path/to/dir/webptimized -l
Warning: this is quite slow.
If neither the output path or quality are specified the same directory will be used along with a quality of 80.
This crate depends on image for decoding. Refer to its Supported Image Formats.
Currently animated GIFs (and WebPs) are unsupported but are planned in a future release. AVIF is not supported.
The goal of this project is to convert a bulk of images to WebP. That means it's currently not very fast at doing single file conversions.
- Add support for animated GIFs