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
Start by locating the board logo upload flow and its file-type validation, then trace how the stored logo is rendered. Review the SVG upload and rendering requirements before deciding what tests are needed; done means board logos can be uploaded as SVG files and continue to display correctly.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend, frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100