webpe
v1.1.3
Published
Convert jpe?g, png images to webp images.
Downloads
2
Maintainers
Readme
Convert jpe?g, png images to webp images.
Install:
(install zx
and webp
for dependencies):
brew install webp
npm i -g zx webpe
Usage:
webpe ./images #convert all images in this folder and sub-folders ex. images/products
webpe /images/price1.png #convert only 1 file
webpe images/ /others/logo.png #convert many files and folders, split by space
log be like this:
┌─────────┬──────────────────────────┬───────────────────────────┬─────────────┬───────────────────┐
│ (index) │ origin │ webp │ saved (KiB) │ total saved (KiB) │
├─────────┼──────────────────────────┼───────────────────────────┼─────────────┼───────────────────┤
│ 0 │ [ 'pic1.1.png', 55.5 ] │ [ 'pic1.1.webp', 47.87 ] │ 7.63 │ │
│ 1 │ [ 'pic1.2.png', 32.93 ] │ [ 'pic1.2.webp', 29.78 ] │ 3.15 │ │
│ 2 │ [ 'pic1.3.png', 219.26 ] │ [ 'pic1.3.webp', 187.65 ] │ 31.61 │ │
│ 3 │ [ 'pic1.4.png', 29.65 ] │ [ 'pic1.4.webp', 23.96 ] │ 5.69 │ │
│ 4 │ [ 'pic2.2.png', 3.67 ] │ [ 'pic2.2.webp', 3.26 ] │ 0.41 │ │
│ 5 │ [ 'pic2.3.png', 4.08 ] │ [ 'pic2.3.webp', 3.7 ] │ 0.38 │ │
│ 6 │ [ 'pic2.4.png', 5.87 ] │ [ 'pic2.4.webp', 5.56 ] │ 0.31 │ │
│ 7 │ [ 'pic2.5.png', 4.38 ] │ [ 'pic2.5.webp', 4.1 ] │ 0.28 │ │
│ 8 │ [ 'pic2.6.png', 3.23 ] │ [ 'pic2.6.webp', 2.92 ] │ 0.31 │ │
│ 9 │ [ 'pic4.1.png', 126.75 ] │ [ 'pic4.1.webp', 76.98 ] │ 49.77 │ │
│ 10 │ [ 'pic4.2.png', 189.19 ] │ [ 'pic4.2.webp', 129.08 ] │ 60.11 │ │
│ 11 │ [ 'pic4.3.png', 346.28 ] │ [ 'pic4.3.webp', 263.73 ] │ 82.55 │ │
│ 12 │ [ 'pic5.1.png', 19.78 ] │ [ 'pic5.1.webp', 16.78 ] │ 3 │ │
│ 13 │ [ 'pic5.2.png', 65.82 ] │ [ 'pic5.2.webp', 68.66 ] │ -2.84 │ │
│ 14 │ [ 'pic5.3.png', 16.9 ] │ [ 'pic5.3.webp', 11.36 ] │ 5.54 │ │
│ 15 │ │ │ │ '247.9 (0.24 MB)' │
└─────────┴──────────────────────────┴───────────────────────────┴─────────────┴───────────────────┘
Done ✨
Author:
ClassFunc Softwares.,JSC (https://classfunc.com)
License:
MIT