npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

iminify

v1.0.16

Published

Image optimization module based on imagemin

Downloads

8

Readme

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 images[1-100].

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

--alphaQuality or --aq :

Define alphaQuality of PNG images. Required for webp Conversion[1-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!