1.0.16 • Published 5 years ago

iminify v1.0.16

Weekly downloads
56
License
MIT
Repository
github
Last release
5 years ago

iMinify Maintainability npm version

iMinify

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

Usage

iMinify is simple cli utility tool.

$ npm install -g iminify
$ minify [options]

Options

--minify or -m :

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

--webp or -w :

Make this true if you want to create webp images e.g: minify -w true -q 60

Type: boolean
Default: false

--lossless or -l :

Make this true if you want to optimize image losslessly e.g: minify -l true

Type: boolean
Default: false

--quality or -q :

Define quality of images1-100.

Type: number
image Type: jpg/jpeg, png
Default: 100

--alphaQuality or --aq :

Define alphaQuality of PNG images. Required for webp Conversion1-100.

Type: number
image Type: png
Default: 100

--progressive, -p :

If you want progressive.true/false

Type: boolean
image Type: jpg/jpeg
Default: true

--speed or -s :

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.

--optimizelevel or --ol :

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.

  1. Stores only the changed portion of each image.
  2. Also uses transparency to shrink the file further.
  3. Try several optimization methods (usually slower, sometimes better results)

--interlaced or --il :

Type: boolean
Default: true
Values: true/false
image Type: gif
Interlace gif for progressive rendering.

--outputDir or -o

Default: Current Directory
Define output folder name(Default: replace files with optimized ones at same location.

--inputDir or -i

Default: Current Directory
Define images folder name(Default: traverse all sub-directories in current directory).

Development

Want to contribute? Great! Make a pull request now!

Todos

  • Add optimization for video files

FAQ & Issues:

Q: It doesn't get installed globally using npm install -g iminify on windows
Ans: Do this:
  1. git clone https://github.com/vsanse/iminify
  2. cd iminify
  3. npm install
  4. npm install -g

or

git clone https://github.com/vsanse/iminify && cd iminify && npm install && npm install -g

Q: Getting permission error using sudo npm install -g iminify on ubuntu/Linux/Mac
Ans: use sudo npm install -g iminify --unsafe-perm=true --allow-root

License

MIT

Free Software, Hell Yeah!

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago