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

Svg images support #1217

Closed
wants to merge 8 commits into from
Closed

Svg images support #1217

wants to merge 8 commits into from

Conversation

eltorio
Copy link
Contributor

@eltorio eltorio commented Feb 26, 2023

Now svg images are supported in nearly all email clients and have many advantages for logo for example.
This adds support for svg image in uploads

@knadh
Copy link
Owner

knadh commented Feb 27, 2023

Thanks for the PR. I checked Gmail and it doesn't support inserting or rendering SVGs. Thunderbird does. Could you share some popular e-mail clients that support SVG?

@eltorio
Copy link
Contributor Author

eltorio commented Feb 27, 2023

Hi,
At least
Proton Mail does,
Apple Mail 16 too,
https://outlook.office.com/ also,


return c.JSON(http.StatusOK, okResp{true})
}

// generate a png thumbnail of src
func getSVGThumb(src multipart.File) (image.Image, error) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need this at all. SVG is vector, so for thumbnails, it can just be scaled down and rendered. The thumb path and the full path can be the same image.

@knadh knadh closed this in 6cf8234 Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants