grunt-svg-cleaner
Grunt task to compress SVG files, based on svg-cleaner.
This project uses svg-cleaner to compress the images rather than SVGO as svgo broke the images in my case.
Getting Started
Install the Grunt plugin with this command:
npm install grunt-svg-cleaner --save-dev
Once the plugin has been installed, it can be enabled inside your Gruntfile with this line of JavaScript:
grunt;
The "svg_cleaner" task
Overview
In your project's Gruntfile, add a section named svg_cleaner
to the data object passed into grunt.initConfig()
.
grunt;
The grunt task will compress each image and save the result into 'output_dir'.