2019-07-15 16:14:50 +02:00
|
|
|
multipass: true
|
|
|
|
|
|
|
|
plugins:
|
|
|
|
# Set <path> precision to 3 decimal places
|
|
|
|
- convertPathData:
|
|
|
|
floatPrecision: 3
|
2019-10-09 22:03:54 +02:00
|
|
|
noSpaceAfterFlags: false
|
2019-07-15 16:14:50 +02:00
|
|
|
|
|
|
|
# Sort attributes on the <SVG>
|
|
|
|
- sortAttrs:
|
|
|
|
order:
|
|
|
|
- role
|
|
|
|
- viewBox
|
|
|
|
xmlnsOrder: end
|
|
|
|
|
|
|
|
# Convert basic shapes (such as <circle>) to <path>, including <arc>
|
|
|
|
- convertShapeToPath:
|
|
|
|
convertArcs: true
|
|
|
|
|
|
|
|
# Compound all <path>s into one
|
|
|
|
- mergePaths:
|
|
|
|
force: true
|
2019-12-09 01:34:31 +02:00
|
|
|
noSpaceAfterFlags: false
|
2019-07-15 16:14:50 +02:00
|
|
|
|
|
|
|
# Keep the <title>
|
|
|
|
- removeTitle: false
|
|
|
|
|
|
|
|
# Don't remove the role="img" attribute and automatically
|
|
|
|
# add it to the SVG if it's not
|
|
|
|
- addAttributesToSVGElement:
|
|
|
|
attributes:
|
|
|
|
- role: img
|
2020-01-19 13:39:42 +02:00
|
|
|
|
|
|
|
# remove any unnecessary attributes
|
2019-07-15 16:14:50 +02:00
|
|
|
- removeUnknownsAndDefaults:
|
|
|
|
keepRoleAttr: true
|
2020-01-19 13:39:42 +02:00
|
|
|
- removeAttrs:
|
|
|
|
attrs:
|
|
|
|
- baseProfile
|
2020-03-14 18:23:35 +02:00
|
|
|
- version
|
2020-03-23 16:00:34 +02:00
|
|
|
- fill-rule
|
2019-07-15 16:14:50 +02:00
|
|
|
|
2020-01-25 12:13:05 +02:00
|
|
|
# remove paths with fill="none"
|
|
|
|
- removeUselessStrokeAndFill:
|
|
|
|
removeNone: true
|
|
|
|
|
2019-07-15 16:14:50 +02:00
|
|
|
# Enable everything else
|
|
|
|
- removeDoctype
|
|
|
|
- removeXMLProcInst
|
|
|
|
- removeComments
|
|
|
|
- removeMetadata
|
|
|
|
- removeXMLNS
|
|
|
|
- removeEditorsNSData
|
|
|
|
- cleanupAttrs
|
|
|
|
- inlineStyles
|
|
|
|
- minifyStyles
|
|
|
|
- convertStyleToAttrs
|
|
|
|
- cleanupIDs
|
|
|
|
- prefixIds
|
|
|
|
- removeRasterImages
|
|
|
|
- removeUselessDefs
|
|
|
|
- cleanupNumericValues
|
|
|
|
- cleanupListOfValues
|
|
|
|
- convertColors
|
|
|
|
- removeNonInheritableGroupAttrs
|
|
|
|
- removeViewBox
|
|
|
|
- cleanupEnableBackground
|
|
|
|
- removeHiddenElems
|
|
|
|
- removeEmptyText
|
|
|
|
- moveElemsAttrsToGroup
|
|
|
|
- moveGroupAttrsToElems
|
|
|
|
- collapseGroups
|
|
|
|
- convertTransform
|
|
|
|
- removeEmptyAttrs
|
|
|
|
- removeEmptyContainers
|
|
|
|
- removeUnusedNS
|
|
|
|
- removeDesc
|
|
|
|
- removeDimensions
|
|
|
|
- removeAttributesBySelector
|
|
|
|
- removeElementsByAttr
|
|
|
|
- addClassesToSVGElement
|
|
|
|
- removeStyleElement
|
|
|
|
- removeScriptElement
|
|
|
|
- removeOffCanvasPaths
|
|
|
|
- reusePaths
|