iMinify is image optimization utility based on imagemin package. It currently supports optimization for:
- png
- jpg/jpeg
- svg
gif
- GIF support delayed till issues are resolved ==> https://github.com/imagemin/gifsicle-bin/issues/104 & https://github.com/kohler/gifsicle/issues/137
iMinify is simple cli utility tool.
$ npm install -g iminify
$ minify [options]
Make this false if you don't want image optimization.e.g- create only webp images without minification
e.g: minify -m false -w true -q 60
Type: boolean
Default: true
Make this true if you want to create webp images
e.g: minify -w true -q 60
Type: boolean
Default: false
Make this true if you want to optimize image losslessly
e.g: minify -l true
Type: boolean
Default: false
Define quality of images[1-100].
Type: number
image Type: jpg/jpeg, png
Default: 100
Define alphaQuality of PNG images. Required for webp Conversion[1-100].
Type: number
image Type: png
Default: 100
If you want progressive.[true/false]
Type: boolean
image Type: jpg/jpeg
Default: true
Type: number
Default: 1
image Type: png
Values: 1 (brute-force) to 11 (fastest)
Speed 10 has 5% lower quality, but is about 8 times faster than the default. Speed 11 disables dithering and lowers compression level.
Type: number
Default: 2
Values: 1 to 3
image Type: gif
Select an optimization level between 1 and 3.
The optimization level determines how much optimization is done; higher levels take longer, but may have better results.
- Stores only the changed portion of each image.
- Also uses transparency to shrink the file further.
- Try several optimization methods (usually slower, sometimes better results)
Type: boolean
Default: true
Values: true/false
image Type: gif
Interlace gif for progressive rendering.
Default: Current Directory
Define output folder name(Default: replace files with optimized ones at same location.
Default: Current Directory
Define images folder name(Default: traverse all sub-directories in current directory).
Want to contribute? Great! Make a pull request now!
- Add optimization for video files
git clone https://github.com/vsanse/iminify
cd iminify
npm install
npm install -g
git clone https://github.com/vsanse/iminify && cd iminify && npm install && npm install -g
MIT
Free Software, Hell Yeah!