Key Takeaways
Keep the source and compare IDs, width, height, viewBox and internal references. KitNelo uses conservative plugins and checks these contracts plus sampled pixels. It does not validate your whole page’s CSS, multiple inline SVGs or every scaling state.
- External webpage code may depend on IDs even when the SVG preview looks unchanged.Read the supporting section: Record invariants before optimization
- Keep caption, panel-fill, panel, gradient references and the 240×120 canvas in the downloaded fixture.Read the supporting section: Check a downloaded gradient-panel fixture
- A pixel comparison covers one sampled rendering; multiple inline SVGs still need an ID-collision check.Read the supporting section: Return to the real webpage after comparing pixels
In this article
Record invariants before optimization
SVGO’s cleanupIds reference describes removing unused IDs and shortening referenced IDs, with a warning about collisions between inline SVGs. An ID unused inside a file may still be referenced outside it.
KitNelo’s current SVG optimizer does not enable cleanupIds or geometry rewriting. It preserves IDs and dimensions while removing some comments and editing metadata. Styles and structure affect metadata preservation; substantial size savings are not guaranteed. Retain the original editing project separately.
Check a downloaded gradient-panel fixture
Download the original SVG fixture (in this page’s exercise ZIP), select it in the SVG optimizer, then optimize and compare. Its canvas is 240×120 with viewBox 0 0 240 120. The IDs are caption, panel-fill and panel; aria-labelledby references the title and the rectangle uses url(#panel-fill).
Confirm that all IDs, the title relationship, gradient reference and dimensions remain. Direct recalculation with the current plugins gives 478 input bytes and 395 output bytes for this exact teaching fixture. This is not a general compression ratio. Check browser comparison and actual download separately.
| Object | Expected invariant | Failure signal |
|---|---|---|
| Root | 240×120; viewBox 0 0 240 120 | Changed dimensions or coordinate range |
| Title | caption and aria-labelledby | Original naming relationship lost |
| Gradient | panel-fill and url(#panel-fill) | Single-colour or transparent fill |
| Rectangle | panel ID and geometry | Page selector no longer finds the element |
Return to the real webpage after comparing pixels
The current comparison samples a maximum long edge of 640 pixels. This smaller fixture is compared at 240×120. It protects one rendering; it does not establish equivalence across browsers, print, responsive sizes or interaction. Very fine differences in large artwork may require a larger manual comparison.
Place the optimized file back in its actual context and inspect external selectors, fragment references and accessible naming. Inlining two files with identical IDs can still create a collision when each optimizer preserves its original IDs. The integrator must coordinate names and references rather than renaming only one side.
Identify rejected input before removing content
This tool supports self-contained static vector content, up to 2MB. Scripts, animation, external resources and embedded bitmaps are rejected. Do not delete useful content simply to pass validation. Rendering failures, changed contracts or sampled differences prevent a result; retain the source.
For inherited colour, see standalone currentColor delivery. For fixed PNG output, use export pixels and viewBox checks. SVG optimization and rasterization are separate delivery decisions.
Further reading & sources
Put the guide into practice
Open the relevant tool, preview the result and check your exported file.

