Skip to content

Instantly share code, notes, and snippets.

@jakubzitny
Created June 12, 2017 09:36
Show Gist options
  • Save jakubzitny/d2b593421ebc6f8a354f9438d86c3531 to your computer and use it in GitHub Desktop.
Save jakubzitny/d2b593421ebc6f8a354f9438d86c3531 to your computer and use it in GitHub Desktop.
SVGO config
{
plugins: [
'removeDoctype',
'removeXMLProcInst',
'removeComments',
'removeMetadata',
'removeEditorsNSData',
'cleanupAttrs',
'minifyStyles',
'convertStyleToAttrs',
'cleanupIDs',
'removeUselessDefs',
{
'cleanupNumericValues': {
'floatPrecision': 2,
'leadingZero': true,
},
},
'cleanupListOfValues',
'convertColors',
'removeUnknownsAndDefaults',
'removeNonInheritableGroupAttrs',
'removeUselessStrokeAndFill',
'cleanupEnableBackground',
'removeHiddenElems',
'removeEmptyText',
'convertShapeToPath',
'moveElemsAttrsToGroup',
'moveGroupAttrsToElems',
'collapseGroups',
'convertPathData',
'convertTransform',
'removeEmptyAttrs',
'removeEmptyContainers',
'mergePaths',
'removeUnusedNS',
'sortAttrs',
'removeTitle',
'removeDesc',
'removeAttrs',
'removeElementsByAttr',
'removeStyleElement',
// Disabled plugins:
// 'removeXMLNS',
// 'removeDimensions',
// 'transformsWithOnePath',
// 'removeRasterImages',
// 'removeViewBox',
// 'addClassesToSVGElement',
// 'addAttributesToSVGElement',
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment