Transforms that can break SVGs
When optimization breaks your SVG, start here. These plugins remove viewBox, embedded rasters, scripts, or rewrite IDs in ways that break responsive layouts, animations, or references. Disable them first, then re-enable related plugins one at a time.
SVGO plugins in this topic
- Remove viewBox
removeViewBoxStrips the viewBox attribute so width and height alone define layout. That often saves bytes but breaks responsive scaling when CSS only sets one dimension.
- Remove raster images
removeRasterImagesDeletes embedded PNG/JPEG inside SVG. Shrinks file size but removes bitmap content.
- Remove script elements
removeScriptsStrips <script> elements and related event attributes from SVG.
- Clean up IDs
cleanupIdsShortens and deduplicates id attributes and updates url(#…) references. Essential for minifying Illustrator exports that ship long random IDs.
Related topics
Try it
Open SVGOMG.net, load your SVG, and toggle the plugins above in the Features panel.