Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept avatars in .svg format #24264

Closed
brobr opened this issue Apr 21, 2023 · 5 comments
Closed

Accept avatars in .svg format #24264

brobr opened this issue Apr 21, 2023 · 5 comments
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@brobr
Copy link

brobr commented Apr 21, 2023

Feature Description

Related to #24263, and initially raised for .webp format at Codeberg, also avatars in .svg format are not accepted/recognized as an image. It would be nice if that format gets accepted as well.

Thanks.

Screenshots

No response

@brobr brobr added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Apr 21, 2023
@delvh
Copy link
Member

delvh commented Apr 21, 2023

The problem is: While it might seem like exactly the same feature, it is completely different:
webp is a "normal" image that works with the <img> tag.
svgs however need their own tag (<svg>).
So, this would need a complete rewrite of the logic.
That is such a huge change that I don't think the benefit is worth the effort.
It's far easier to require users to convert their svgs beforehand.
So, from my side this is a weak reject.
I don't know how other maintainers see it.

@yardenshoham
Copy link
Member

I think you can do <img> with SVG https://caniuse.com/svg-img

@delvh
Copy link
Member

delvh commented Apr 21, 2023

Okay, TIL.
In that case, my comment above is now outdated and no longer a blocker.

@wxiaoguang
Copy link
Contributor

Since JS code could be embedded in SVG, the security concern should be addressed first.

@silverwind
Copy link
Member

silverwind commented Apr 22, 2023

Duplicate with #8707. The challenge with SVG is security as SVGs can contain scripts so a proper sanitizer is needed. <img> tag will otherwise work fine.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

5 participants