optimizer-imagemin
This plugin for the RaptorJS Optimizer allows the imagemin module to be used to minify GIF, PNG, JPG and SVG images during optimization.
Installation
Install the plugin:
npm install optimizer-imagemin --save
Enable the plugin:
;
Plugin Configuration
This plugins supports the following builtin image minification plugins:
- gifsicle — Compress GIF images.
- jpegtran — Compress JPG images.
- optipng — Lossless compression of PNG images.
- pngquant — Lossy compression of PNG images.
- svgo — Compress SVG images.
The full list of plugins can found on the following page: imagemin plugins
If you intend to use a non-builtin plugin then you must npm install
it first (e.g. npm install imagemin-webp
).
Sample Configuration
;