AP-028 Optimise oversized logo.svg asset - #561
Conversation
|
Nice work on this optimisation. I reviewed the changed asset and verified the before-and-after result.
|
Thanks for the thorough review, Aruj. On the base64 point, that was a deliberate choice, mainly to avoid touching anything outside the actual problem. The main issue was the 3.9MB asset loading on every sidebar render, so I focused on shrinking that without changing how /logo.svg is referenced elsewhere. A true vector or a split-out PNG would likely mean updating the sidebar import (and possibly other places), which felt like it might be outside what this ticket was asking for. That said, if there's a reason it should still be a proper vector, I'm happy to take another pass — just wanted to explain the reasoning first. On the favicon — good catch, and I think this one's actually already handled in #507 (AP-015), which adds favicon.ico and the tag. It hasn't merged yet since it's still working through a rebase with Krisha, so I didn't want to duplicate that work here. Does it sound reasonable to keep AP-028 scoped to just the asset-size fix, and let #507 cover the favicon once it lands? Happy to help make sure it's verified when that happens. |
Summary
Optimizes the oversized
logo.svgasset used in the Admin Panel sidebar.Closes AP-028.
The problem
app-frontend/admin-panel/public/logo.svgwas 3.9MB — a print-resolution PNG (2480×3508px) wrapped inside an SVG using a pattern/matrix transform, despite only ever being displayed at 36×36px in the sidebar. The transform math was also subtly cropping the logo, cutting off the "SECURE SHIFT" text banner at the bottom.The fix
<image>markup instead of the fragile pattern/matrix export artifactResult
As a side effect, the logo now renders in full (previously cropped) if reused anywhere larger than the sidebar icon.
Evidence
Checklist