Skip to content

wechat-miniprogram-admin/imagemin-cli

 
 

Repository files navigation

imagemin-cli Build Status

Minify images


Gumlet is helping make open source sustainable by sponsoring Sindre Sorhus.
Optimised Image Delivery made simple

Issues with the output should be reported on the imagemin issue tracker.

Install

$ npm install --global imagemin-cli

Usage

$ imagemin --help

  Usage
    $ imagemin <path|glob> ... --out-dir=build [--plugin=<name> ...]
    $ imagemin <file> > <output>
    $ cat <file> | imagemin > <output>

  Options
    --plugin, -p   Override the default plugins
    --out-dir, -o  Output directory

  Examples
    $ imagemin images/* --out-dir=build
    $ imagemin foo.png > foo-optimized.png
    $ cat foo.png | imagemin > foo-optimized.png
    $ imagemin --plugin=pngquant foo.png > foo-optimized.png
    $ imagemin --plugin.pngquant.quality={0.1,0.2} foo.png > foo-optimized.png
    $ imagemin --plugin.webp.quality=95 --plugin.webp.preset=icon foo.png > foo-icon.webp

Related

About

Minify images seamlessly

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%