The big idea: an exported SVG is mostly stuff you don't need
Open any icon exported from a design tool and look at what's riding along: editor metadata, empty groups, redundant transforms, a comment advertising the exporter, and path coordinates specified to six decimal places for a 24-pixel drawing. Routinely 40–60% of the file is removable with zero visual change.
The fix has been the same for a decade: SVGO (or its GUI, SVGOMG). But most people either never run it, or run it with defaults that occasionally eat their icon. Three settings cause nearly all the accidents:
removeViewBox— turn it OFF. The viewBox is what lets your icon scale responsively. Removing it "saves" 20 bytes and breaks CSS sizing. This default has burned everyone once.cleanupIDs— care when icons contain gradients/masks. ID collisions between inlined icons can make one icon's gradient hijack another's. Prefix IDs per icon.Precision: 2 decimal places is plenty for 24px artwork. Six is cargo cult.
Do icons even matter for performance? One icon, no. Two hundred inlined across your app's routes — now it's real bytes in every bundle, and it compounds with the delivery choice from edition #3 (a sprite caches once; inline ships per page).
And the obligatory funeral: icon fonts lost for good reasons — they're invisible to screen readers or announced as gibberish, they render as tofu boxes when the font fails to load, they can't do multicolor, and they hijack a text format for graphics. If a legacy corner of your app still ships Font Awesome as a webfont for four icons, this is your sign: that's ~70–300KB of font for icons SVG would deliver in two.
60-second tip
Drag your five most-used icons into SVGOMG right now and look at the before/after byte counts. That percentage is roughly what your whole icon set is overpaying — sweep your /assets folder and reclaim it.
Steal this: the safe-default SVGO config
Our svgo.config.js with every risky plugin disabled or tamed, comments explaining why each choice is safe, precision set sanely, and a one-line npm script to sweep your whole icons directory. Drop in, run once, commit the savings.
Before you go
What's the most cursed thing you've found inside an SVG file? Reply — we've seen a full base64 JPEG hiding inside a "vector" icon, and we'd love to be out-horrified.
— Iconic, by IconBuddy
Some links may be affiliate links — we earn a commission at no extra cost to you. We only recommend tools we actually use.