The benchmark uses the same broad classes of cleanup exposed by FromSVG’s Optimize SVG workflow: path and group cleanup, comment and metadata removal, numeric precision of three decimals, ID cleanup, and color conversion. The benchmark is generated from source fixtures in the repository, not from user files.
Aggregate result for this fixture set
Fixtures
4
Raw source
2.40 KiB
Optimized
1.29 KiB
Gzip saved
31.43%
Across these four fixtures, raw source decreased by 46.34% and gzip output decreased by 31.43%. These figures describe this fixture set only.
Fixture-level measurements
| Fixture | Raw | Optimized | Raw saved | Raw gzip | Optimized gzip |
|---|---|---|---|---|---|
| editor-export.svg | 623 B | 218 B | 65.01% | 347 B | 158 B |
| illustration.svg | 641 B | 497 B | 22.46% | 368 B | 329 B |
| line-icon.svg | 413 B | 179 B | 56.66% | 236 B | 155 B |
| logo-mark.svg | 781 B | 425 B | 45.58% | 398 B | 283 B |
Reproduce the benchmark
Clone the repository, install the existing dependencies, and run the checked-in command from the repository root:
npm run benchmark:svgThe command reads benchmarks/fixtures/*.svg, runs SVGO, computes UTF-8 and gzip sizes, records hashes, and rewrites benchmarks/svg-optimization.json. Review the generated diff whenever the fixtures, SVGO version, or configuration changes.
Configuration used
| Engine | SVGO ^4.0.1 |
|---|---|
| Precision | Three decimal places for path and numeric cleanup |
| Cleanup | IDs, groups, paths, comments, metadata, titles, descriptions, and colors |
| Gzip | Node zlib gzipSync at compression level 9 |
What this benchmark does not measure
Byte and gzip size do not measure visual similarity, browser parse time, render time, cache behavior, or the effect of an asset inside a larger bundle. An optimized SVG can also remove metadata that matters for accessibility or licensing. Keep the original source and inspect the output in the target browser and application. The benchmark’s fixture-level result should not be used as a guaranteed percentage for a different SVG corpus.
Continue with FromSVG
- Optimize SVG for adjustable cleanup and precision.
- Compress SVG for a repeatable size-first preset.
- Minify SVG when formatting overhead is the main issue.
- Read the SVG optimization guide for a production review workflow.
