CLI Converter from png/jpg images to webp
- Install webpconvert
npm install -g webpconvert
- Run this command
webpconvert [source] [target] [options] # Example webpconvert webpconvert sample-images webpconvert sample-images -q 50 webpconvert sample-images output webpconvert sample-images -m webpconvert sample-images/KittenJPG.jpg
webpconvert --help
npx webpconvert [source] [target] [options]
Option | Option alias | Description | Type | Default |
---|---|---|---|---|
-p | --prefix | Specify the prefix of output filename. | string | "" |
-s | --suffix | Specify the suffix of output filename. | string | "" |
-q | --quality | Specify the quality of webp image. Lower values yield better compression but the least image quality. | number | 80 |
-r | --recursive | Include files in sub-folders. Will be ignored if the [source] is a file. | boolean | |
-m | --mute | Disable output messages. | boolean | |
-h | --help | Show help. | boolean | |
-v | --version | Show version number. | boolean |
- Fork this repo
- Develop
- Create pull request
- Tag @rizqirizqi for review
- Merge~~
yarn start [source] [target] [options]
# Run test:
yarn test
# Update snapshot files:
yarn test -u
yarn lint
MIT