✨ Ship ErrorPage default symbol & logo as data: URIs#22
Conversation
Consuming apps no longer need to provide image assets for the error page to render. The default symbol (SVG watermark) and logo (PNG) are embedded as base64 data URIs lazily loaded from text files. The Twig template detects 'data:' prefixed values and renders them as-is, falling back to asset() for traditional paths — so custom overrides keep working unchanged. Follow-up to #18 (smoke-test feedback).
|
Smoke-tested in Impala — confirmed the consumer-side promise of the PR. What I verified
One thing to flag The embedded default
Functionally LGTM, just want a call on the branding intent before tag. |
Replace the placeholder symbol-only PNG with the official 150x50 enabel-logo-email.png (5 KB / ~6.6 KB base64) so the embedded default matches the visual identity carried by the abandoned layout bundle. Addresses PR #22 smoke-test feedback.
|
Updated in 0e747e5 — replaced the placeholder logo with the official Tests still green (the assertions only check the |
Summary
Follow-up to #20 (closed by smoke-test feedback on consumer apps needing to ship the logo asset).
symbolandlogoasdata:URIs embedded in the bundle — consuming apps no longer need to provide any image asset for the error page to render out of the box.src/Component/Layout/Defaults/error_page_{logo,symbol}.txt) with static memoization, so the heredoc-sized base64 strings stay out of the PHP class body.data:prefixed values and renders them inline, falling back toasset()for traditional paths. Custom overrides keep working unchanged.Why data URIs only for
ErrorPage(and not forEmailLayoutfrom #21)Data URIs in
<img src>are reliably rendered by every modern browser, so they're a great fit for HTTP-served pages like the error template. In emails, however, Outlook desktop blocks them and Gmail strips them in some contexts — that's whyEmailLayoutkeeps theemail.image()CID-embedding approach.Test plan
symbol/logooverrides, confirm the page is fully self-contained (no broken images, no 404s on the watermark)