On this page
A clean SVG export is not simply the smallest file Figma can produce. It is an asset with predictable dimensions, intact artwork, sensible colors, and no hidden dependency on the original design file. The most effective workflow begins before export and ends with a browser comparison at the sizes where people will actually see it.
Define what the exported asset must do
Decide whether the SVG is a fixed illustration, a monochrome interface icon, or a multicolor mark. These need different handoff rules. A fixed illustration can retain explicit colors. A reusable icon often needs currentColor. A brand asset may require exact colors and proportions that must not be changed during cleanup.
Use the SVG minifier after producing a baseline export. Compare its output with the original rather than assuming fewer characters always means a better result. Keep the original Figma source and the unoptimized export available so you can isolate any visual regression.
Define acceptance criteria before adjusting paths: expected aspect ratio, intended display sizes, whether CSS should recolor the asset, and whether multiple instances will appear on one page. The existing SVG production guide provides broader delivery context; this workflow concentrates on preparing and validating the Figma handoff.
Prepare a deliberate export boundary
Create a dedicated frame or component for the deliverable. Name it clearly, such as icon-search-24 or illustration-team-workflow, and remove accidental off-canvas objects. A frame with an intentional boundary is easier to reason about than an arbitrary selection containing invisible leftovers.
For interface icons, use a consistent grid such as 24 by 24 design units, with an agreed optical margin. This is a starting convention, not a law: a wide arrow and a circle may need different apparent sizes to feel balanced. Check optical alignment, not just equal bounding boxes.
Inspect strokes that sit outside the nominal boundary. A centered stroke extends beyond its path; clipping at the frame can cut off its ends. Shadows and blurs also extend beyond the underlying object. Either provide intentional room or simplify the effect. Do not expand the frame randomly until the clipping disappears, because that changes alignment across the asset family.
Remove hidden drafts and unnecessary groups from the export component. Keep editable construction elsewhere in the design document. Consult Figma's export documentation for the available settings in your current interface rather than assuming screenshots from an older workflow still apply.
Resolve strokes, text and special effects
Strokes are often efficient and useful for icons, especially when they share a consistent cap, join, and width. Outlining strokes converts their appearance into filled geometry. That can help preserve a particular visual treatment, but it often adds nodes and makes later adjustment harder. Outline deliberately, not automatically.
If an icon must retain a constant stroke thickness while its geometry scales, investigate non-scaling-stroke in the implementation rather than guessing at export settings. That behavior is different from ordinary proportional scaling and should be tested at both small and large sizes.
Text presents another tradeoff. Outlining a short decorative wordmark avoids font dependencies but removes selectable text and increases geometry. Actual interface copy should normally stay in HTML, where it can wrap, translate, and respond to user settings. Avoid baking a changing product label into an illustration merely because it is convenient in Figma.
Inspect gradients, masks, blend modes, and filters in a browser. Some effects produce much more markup than expected, and complex effects may be a poor fit for tiny assets. Figma can also export raster content inside SVG, so the extension alone does not guarantee an entirely vector image. Zoom in and inspect the markup for embedded image data when file size seems disproportionate.
Inspect the markup and preserve useful structure
Open the exported file as text. Look for a viewBox, explicit dimensions, fills, strokes, IDs, and references to gradients or clipping paths. The viewBox is the coordinate contract between the artwork and its rendered viewport. Removing it can break responsive resizing even when the asset still looks correct at its original size.
A simple monochrome icon might end up like this after deliberate cleanup:
<svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24" width="24" height="24"
fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round">
<circle cx="10" cy="10" r="6" />
<path d="m15 15 5 5" />
</svg>The MDN viewBox reference explains how these four numbers establish the internal coordinate system. Keep width and height when they provide useful intrinsic dimensions; CSS can still set the rendered size.
Use currentColor only for artwork meant to follow the surrounding text color. It works naturally for inline SVG, but an SVG loaded through an image element does not inherit the host page's color in the same way. Do not replace every fill in a multicolor illustration with currentColor.
When embedding SVG inline multiple times, check unique IDs for masks, gradients, and clip paths. Duplicate references can select the wrong definition. Prefix IDs per instance or use a component implementation that handles uniqueness. Preserve linked references whenever renaming IDs.
Optimize conservatively and test the handoff
Remove metadata and redundant attributes only when doing so preserves the intended behavior. Start with conservative precision settings. Rounding coordinates aggressively can distort curves, close small gaps, or change how adjacent shapes meet. Compare at 100% and at the smallest production size, not only at a large zoom level.
For automated pipelines, SVGO's official documentation explains plugin-based optimization. Review configuration rather than treating every plugin as harmless. An optimizer cannot know that a particular ID is used by application code or that a color will become a theme hook later.
Build a small preview showing the asset on light and dark backgrounds, at 16, 24, 48, and 96 CSS pixels when those sizes are relevant. Include adjacent icons to reveal inconsistent weight. For illustrations, test the actual content-column width instead of icon sizes. Use before-and-after comparison to catch missing effects, clipping, and altered proportions.
Choose the embedding method intentionally. Image elements suit self-contained illustrations; inline SVG suits icons needing CSS styling. Provide appropriate alternative text or control labeling at integration time, because export cleanup does not establish accessibility semantics. For deeper cleanup strategies, consult programmatic SVG optimization.
Finally, hand over the intended dimensions, recoloring rules, and any special limitations with the file. A short note saying monochrome, inline only, inherits text color prevents more mistakes than an opaque filename containing final-final-v3.
Key takeaways
- Export from an intentional frame with tested boundaries.
- Preserve editable design sources and an unoptimized baseline.
- Keep the viewBox and inspect embedded raster content and effects.
- Outline strokes or text only for a clear reason.
- Validate optimized output at real display sizes and integration contexts.
Reach designers & developers at work
Put your product next to the tools people use every day. One sponsor per placement, no tracking pixels.
Become a sponsor