Repository navigation
feat: app icon, .ico favicon, web app manifest, and logos and icons set by themes - #5319
Merged
Merged
Conversation
This was referenced Oct 28, 2026
imorland
marked this pull request as ready for review
October 28, 2026 14:55
This was referenced Oct 28, 2026
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.
Fixes: no issue filed.
Changes proposed in this pull request:
A forum can only set a favicon, which is stored as a 64px PNG and linked as a
shortcut icon. There is no Apple touch icon or web app manifest, so phones show a screenshot or a letter when someone adds the forum to their home screen..icofavicons are refused by the validator. A theme can't set any of its logos or icons from code..ico, which the page links, and.icofiles can be uploaded. Without a favicon, the app icon is used./manifest, served by Flarum so it works on any web server and stays on the forum's domain when assets are on S3 or a CDN. It opens the forum in the browser;Extend\Theme::manifest()lets an extension such as fof/pwa change that./favicon.icoredirects to the icon for crawlers and feed readers.Extend\Themecan set every logo and icon:logo(),logoDarkMode(),emailLogo(),favicon()(with an optional SVG) andappIcon(). They go through the same pipeline as uploads, and the Appearance page shows them locked.logo(height, quality)from feat: store logos taller and at a higher quality #5309, not yet released, becomeslogoSize().Every size is drawn from the source, never from a smaller copy, and never enlarged. Icons are PNGs at the highest compression, and every file is stored with an explicit content type and a long-lived cache header, as names change whenever the image does.
Docs: flarum/docs#693
Reviewers should focus on:
Flarum\Forum\Branding\Brandingis the one place logo and icon URLs come from;ForumResource, the page head, emails, the standalone pages and discussion link favicons all ask it.ThemeImagesdraws a theme's images once, and again only when a file or option changes, keeping what it drew in a setting. A request compares file sizes and modification times once; an image that can't be drawn is logged and left out rather than retried on every request.Theme::manifest()instead (Build on core's web app manifest and app icon (Flarum 2.1) FriendsOfFlarum/pwa#36)..icorequests straight to the filesystem, so/favicon.icoonly reaches Flarum there with a config change in flarum/flarum ([2.x] Serve /favicon.ico through Flarum in the nginx config shipped with flarum/flarum #5320). Browsers use the page's links either way.Necessity
Confirmed
yarn testinjs/).composer test).