Skip to content

Accept avatars in .svg format #24264

Closed
Closed
@brobr

Description

@brobr

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

Activity

added
type/featureCompletely new functionality. Can only be merged if feature freeze is not active.
type/proposalThe new feature has not been accepted yet but needs to be discussed first.
on Apr 21, 2023
delvh

delvh commented on Apr 21, 2023

@delvh
Member

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

yardenshoham commented on Apr 21, 2023

@yardenshoham
Member

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

delvh

delvh commented on Apr 21, 2023

@delvh
Member

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

wxiaoguang

wxiaoguang commented on Apr 22, 2023

@wxiaoguang
Contributor

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

silverwind

silverwind commented on Apr 22, 2023

@silverwind
Member

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.

locked as resolved and limited conversation to collaborators on Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/featureCompletely new functionality. Can only be merged if feature freeze is not active.type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @silverwind@wxiaoguang@brobr@yardenshoham@delvh

        Issue actions

          Accept avatars in .svg format · Issue #24264 · go-gitea/gitea