@jkhanseong/webp-converter
v1.2.1
Published
Converts JPEG and PNG images to WebP format.
Downloads
3
Readme
WebP Converter
This tool converts JPEG, PNG, and GIF images to WebP format, providing details on the compression achieved for each file.
Installation
npm install -g @jkhanseong/webp-converter
Usage
webp-converter [options]
Options
-i, --input <dir>
: Input directory. Defaults topublic
.-o, --output <dir>
: Output directory. Defaults topublic
.-q, --quality <number>
: Set the quality of the output WebP images. Acceptable values are from 1 to 100. Defaults to 80.
Output
For each file processed, the script outputs:
- File path
- Original size
- Compressed size
- Compression ratio
Contributing
- Fork the repository and create your branch from
main
. - Install dependencies using
npm install
. - Run tests using
npm test
. - Make your changes and write tests if necessary.
- Submit a pull request.