I'm trying to use imagemin-cli for npm scripts, but there is no documentation for using plugin options.
The plugin I want to use is svgo and the option is removeDimensions=true
, how would this look as an npm scripts command?
This is an example of a command I ran unsucessfully:
imagemin [--plugin=svgo --option=removeDimensions=true] src/img/** --out-dir=dist/img/
Imagemin-cli now supports a way to pass those options; some examples from the Readme:
Here are some examples that I'm currently using:
If you're interested in the details, this was added in PR 23.