The svgo example in the readme ...
options: {
svgo: ['--enable', 'cleanupIDs', '--disable', 'convertColors']
}
... is no longer valid. To configure svgo a config file is needed.
By example, for others who struggle with. Here is what I have done to optimize my SVG for the WEB usage:
Set --config option in the grunt-image options ...
options: {
svgo: ['--config', 'svg4web.svgo.js']
},
.. and create a config file : svg4web.svgo.js
module.exports = {
plugins: [
{
name: 'preset-default',
},
// make diff friendly
'sortAttrs',
// Optimize SVG for WEB usage
'convertStyleToAttrs',
'removeXMLNS'
],
};
The svgo example in the readme ...
... is no longer valid. To configure svgo a config file is needed.
By example, for others who struggle with. Here is what I have done to optimize my SVG for the WEB usage:
Set
--configoption in the grunt-image options ..... and create a config file :
svg4web.svgo.js