Move group attrs to elements (moveGroupAttrsToElems)
Pushes group-level presentation attributes down to children when that yields smaller output.
What Move group attrs to elements does in SVGO
SVGO applies moveGroupAttrsToElems as part of its plugin pipeline. In SVGOMG the toggle is labeled Move group attrs to elements (enabled by default). Optimization runs entirely in your browser — files are not uploaded to a server.
Use the SVGOMG optimizer with Show original to compare before and after. If output looks wrong, disable this plugin first, then re-enable related transforms one at a time.
When to enable
Deep groups with few children where inlining attrs is cheaper.
When to disable
When group-level styling is intentional for later editing.
Watch out for
Can increase file size if many children inherit the same long values.
Try it in SVGOMG
- Open svgomg.net and load your SVG (file, paste, or demo).
- Find Move group attrs to elements in the Features panel (
moveGroupAttrsToElems). - Toggle the plugin and compare the preview; download when satisfied.
SVGO Plugin Guide
Browse the SVGO Plugin Guide or read the full SVG optimization walkthrough on the homepage.