Add favicon link tags so Safari renders an icon#199
Merged
Conversation
Safari (especially ≤15 desktop and iOS) renders no favicon because app.html had zero link tags and only an SVG icon was injected by the +layout.svelte. Add icon (svg + png fallback), apple-touch-icon, mask-icon, and theme-color to app.html so Safari finds a usable icon on first paint without depending on layout-level head injection. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<link rel="icon">(SVG + PNG fallback),apple-touch-icon,mask-icon, andtheme-colortofrontend/src/app.htmlso Safari has a discoverable favicon on first paint.app.htmlhad zero icon tags; the only favicon link came from+layout.svelte's<svelte:head>and was SVG-only, which Safari ≤15 and iOS share/home-screen flows don't pick up./icons/icon-512.{svg,png}assets — no new image files.Notes
frontend/src/routes/+layout.svelte:267already declares<link rel="icon" type="image/svg+xml" href={Logo} />. That layout-injected tag still wins for the SVG icon (it renders after%sveltekit.head%), so the SVG line inapp.htmlis a redundant baseline. The PNG, apple-touch-icon, and mask-icon entries are net-new and are what actually unblock Safari ≤15 and iOS.~/Library/Safari/Favicon Cache/before they see the icon.Test plan
npm run check— 0 errors (pre-existing warnings unchanged)npm run build— succeeds;build/icons/icon-512.{svg,png}emitted and the new link tags appear inbuild/index.htmlOut of scope (follow-ups)
apple-touch-icon.pngand 32×32 favicon to avoid sending the 21 KB 512 PNG.static/favicon.icoto quiet bare/favicon.ico404s.mask-icon(current SVG is multi-color; Safari flattens it).🤖 Generated with Claude Code