SVGOMG.net How to optimize

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 removeViewBox

    Strips 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 removeRasterImages

    Deletes embedded PNG/JPEG inside SVG. Shrinks file size but removes bitmap content.

  • Remove script elements removeScripts

    Strips <script> elements and related event attributes from SVG.

  • Clean up IDs cleanupIds

    Shortens 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.