Enabling SVGO automation with 'grunt-svgmin' and conservative
plugin settings to build step, among those:
- enable removeRasterImages and sortAttrs,
- disable cleanupIDs, removeDesc, removeTitle, & removeViewBox as
described in
https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration
- disable removeXMLProcInst; if the SVG doesn't start with an XML
declaration, then it's MIME type will be detected as "text/plain"
rather than "image/svg+xml" by libmagic and, consequently, MediaWiki's
CSSMin CSS minifier. libmagic's default database currently requires
that SVGs contain an XML declaration:
<https://github.com/threatstack/libmagic/blob/master/magic/Magdir/sgml#L5>.
- make use of pretty and multipass options.
Settings are stored in a JSON file to be independent of the Grunt build
process. Also updating SVG accordingly.
Bug: T185596
Change-Id: I715ad4cf2e900665e4c32c78b4c2d9d9cebf0222