Plugin for minification reference images
npm install hermione-image-minifier

Plugin for hermione to minificate reference images (uses optipng).
``bash`
npm install hermione-image-minifier
Plugin has following configuration:
* enabled (optional) Boolean – enable/disable the plugin; by default plugin is enabledNumber
* compressionLevel (optional) - compression level from 0 to 7; by default 2
Also there is ability to override plugin parameters by CLI options or environment variables
(see configparser).
Use hermione_image_minifier_ prefix for the environment variables and --hermione-image-minifier- for the cli options.
Add plugin to your hermione config file:
`js`
module.exports = {
// ...
system: {
plugins: {
'hermione-image-minifier': {
enabled: true,
compressionLevel: 7 // maximal compression, but takes the most time
}
}
},
//...
}
To turn on debug mode set DEBUG=hermione:image-minifier enviroment variable:
`bash`
$ DEBUG=hermione:image-minifier ./node_modules/.bin/hermione --update-refs
Console output:
`bash``
/path/to/reference/image.png compressed by 30%