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. |
|
Thanks for explaining, Pratigya. Keeping the optimised asset at /logo.svg is a reasonable implementation choice given the verified reduction from 4,088,062 to 33,834 bytes. I don't see a technical reason to require a true vector solely for its format after that improvement. Keeping favicon integration in AP-015/#507 also makes sense and avoids duplicating work. Please add that scope explanation to this PR description, including the decision to retain the small embedded PNG, so Krisha can reconcile it with the original ticket wording. The favicon requirement should remain tracked through #507 until it is merged and verified. That resolves my technical concern about the approach. From my first-pass review, the asset-size improvement is ready for Krisha's final assessment, with the scope clarification recorded. Thanks for following up. |
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