Scope: the 74 SVG files in after/core/themes/default_admin/images/ (41,981 bytes total). This is a measurement plus two bounded pilots and a cleanup batch, not a bulk rewrite.
| Item | Bytes | Share of total | Risk |
|---|---|---|---|
| Unused after-side assets | 11,068 removed; 558 pending | 26.4% removed | Delete rather than optimise |
| Two identical file-type pairs | 1,546 redundant | 3.7% | Low; deduplicate the CSS URL, not the artwork |
| Whitespace/comments between tags | 1,411 | 3.4% | Low; lossless |
| SVGO 4-decimal path conversion, all 74 | 9,214 | 21.9% | Not yet validated per file; geometry/path data changes |
| SVGO 3-decimal path conversion | ~10,700 | ~25% | Rejected: measured pixel differences at 24–192px |
Total SVG payload is small. Removing dead assets is a bigger, safer win than minifying used paths. Delivery compression and caching will matter more than a few hundred bytes for the used set.
icons/required.svgTool: SVGO 3.3.5, run only in /tmp, no repository dependency.
Config properties: preset-default with removeViewBox: false, cleanupIds: false, removeTitle/Desc/Metadata/Comments: false, convertColors: false, mergePaths: false, convertShapeToPath: false, convertPathData at 4 decimals, multipass: false.
| File | Before | After | Saving |
|---|---|---|---|
icons/required.svg |
1,130 B | 920 B | 18.6% |
icons/logos/drupal.svg (pilot only, not applied) |
1,610 B | 1,222 B | 24.1% |
Pixel comparison (transparent canvas, RGBA, exact per-pixel diff):
| Asset | 16px | 24px | 32px | 42px | 64px | 192px |
|---|---|---|---|---|---|---|
| required, 4 decimals | 0 | 0 | 0 | 0 | 0 | 0 |
| drupal, 4 decimals | 0 | 0 | 0 | 0 | 0 | 0 |
| required, 3 decimals | 0 | 5 px (Δ64) | 2 px (Δ64) | 2 px (Δ64) | 4 px (Δ64) | 23 px (Δ64) |
| drupal, 3 decimals | 0 | 0 | 0 | 0 | 0 | 8 px (Δ64) |
4-decimal output was pixel-identical at all tested sizes for both pilot assets. 3-decimal output was rejected. The path data was rewritten to relative/shorthand commands; this is not byte-identical geometry, so pixel equality at tested sizes is evidence, not proof at every scale or renderer.
Pilot patch: proposed/interdiff-svg-optimization-required.patch (1 file; 920 bytes). Report: this file.
viewBox, currentColor, IDs, titles/descriptions, metadata or licence comments.The first pilot applied required.svg. The batch execution below adds the 14-file unused-asset cleanup and the five-icon status family; other assets remain unchanged. Actual full-MR-theme Drupal testing is still pending.
Removed from proposed after confirming no consumer references:
appearance, blocks, bookmarks, content, files, media, nav-toggle-left, nav-toggle-top, people, reports, structure, user, pretint/chevron-down-default, pretint/remove-default.
search.svg is kept for the pending muted-search fix; chevron-left.svg is kept pending the RTL decision.proposed/tests/svg_cleanup_test.py (3 tests, passing).proposed/interdiff-svg-cleanup.patch.Five used assets, same SVGO settings as the required.svg pilot:
| Asset | Before | After | Saving | Pixel check |
|---|---|---|---|---|
icons/clock.svg |
279 | 244 | 12.5% | identical 16–192px |
icons/server.svg |
415 | 364 | 12.3% | identical 16–192px |
icons/database.svg |
349 | 306 | 12.3% | identical 16–192px |
logos/drupal.svg |
1,610 | 1,223 | 24.0% | identical 16–192px; 1 edge pixel at 512px |
logos/php.svg |
1,211 | 1,192 | 1.6% | identical 16–512px |
Total: 535 bytes saved (13.8%) on the family. Tests: proposed/tests/svg_optimization_status_family.py (4 tests, passing). Patch: proposed/interdiff-svg-optimization-status-family.patch.
The one 512px edge-pixel difference for the Drupal logo is at a non-UI scale; it is recorded rather than hidden. The optimized family has not yet been installed into a full MR-theme Drupal site; the existing live status test used the pre-optimisation assets and the forced-colours CSS fix.
After-side baseline: 74 files / 41,981 bytes.
Proposed tree after cleanup and the two optimisation pilots: 61 files / 30,380 bytes — 11,601 bytes less (27.6%). The proposed tree also adds pretint/check-disabled-inverse.svg, so the reduction is net of that addition.