bear-imagemin-cli
v1.0.3
Published
imagemin + sharp Nodejs image processing cli
Downloads
14
Maintainers
Readme
bear-imagemin-cli
bear-node-imagemin cli by docker service
Build Docker file
yarn add -D bear-imagemin-cli
Client is docker service in your package.json
{
"scripts": {
"image:lossySquash": "bear-imagemin-cli lossySquash --sourceFile=./example/source.png --saveFile=./example/lossySquash/image_1024.png --resizeWith=240"
}
}
# then run `yarn image:lossySquash`
PS: $version
change current number (ex: 1.0.8)
Test
node ./dist/bin/cli.js losslessSquash -s /Users/imagine/project/packages/bear-node-imagemin/packages/bear-imagemin-cli2/static/fixture.jpg -t /Users/imagine/project/packages/bear-node-imagemin/packages/bear-imagemin-cli2/static/output_losslessSquash.png -w 240
node ./dist/bin/cli.js lossySquash -s /Users/imagine/project/packages/bear-node-imagemin/packages/bear-imagemin-cli2/static/fixture.jpg -t /Users/imagine/project/packages/bear-node-imagemin/packages/bear-imagemin-cli2/static/output_losslessSquash.png -w 240 -q 90
API Params
post body
body name | type | required | default |
-------------|--------------------|----------|---------|
sourceFile | Buffer | ✓ |
resizeWidth | number |
resizeHeight | number |
quality | number |
ignoreOverflowSize | boolean | | true
extname | .jpg, .png, .webp' | | .webp |
License
MIT © imagine10255