SVG Logo Upload Support
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Feature Request
**Is your feature request related to a problem? Please describe.**
No just a feature suggestion.
**Describe the solution you'd like**
Allow upload of SVG files as board Logo.
**Justify why this feature belongs in Flarum's core, rather than in a third-party extension**
SVG is an increasingly popular format for websites, especially for logos, and at this point I'd say it's close to becoming the standard. Examples of a few websites that use SVG logos;
- https://github.com/
- https://www.youtube.com/
- https://www.apple.com/
You guys yourself even use it for your docs logo here; https://docs.flarum.org/img/logo-docs.svg but due to this very limitation you are forced to use a png logo on your board instead; https://discuss.flarum.org/assets/logo-9yg6hfqg.png
With 1440p, 4k, and even 5k-6k monitors becoming more accessible to more people, I think this is a must-have for Flarum.
**Describe alternatives you've considered**
You can bandaid fix this at the moment by manually adding your svg filename in the database, but this is not really very user friendly for newer users, and really, I think this should be as simple as just accepting SVG file mimetype on the upload I think?
If SVG is completely off the table for some reason (Can't think of one), then it might still be worth offering an alternative via srcset responsive images https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
Personally I think SVG is still the better choice, but both would likely be ideal so people can choose and just use whatever they prefer. :)
Contributor guide
Research direction
No files, tests, or entry points are named. Start by locating the board logo upload validation and the code that renders the logo, then trace how uploaded MIME types are handled. Done means SVG logos can be uploaded and displayed without requiring a database edit, with existing logo uploads still working.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100