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

[Feature] Add an option to convert svg to png in url parameters #40

Open
Galaxy-Coding opened this issue Jun 30, 2021 · 6 comments · May be fixed by #42
Open

[Feature] Add an option to convert svg to png in url parameters #40

Galaxy-Coding opened this issue Jun 30, 2021 · 6 comments · May be fixed by #42
Assignees
Labels
enhancement New feature or request

Comments

@Galaxy-Coding
Copy link

Galaxy-Coding commented Jun 30, 2021

It would be cool that if someone added ?format=png to the end of the URL, the image is automatically converted to a PNG file. I might do a PR later on that if I have time
Edit: This is necessary when sending messages to discord, as discord does not allow embedded SVG for security reasons.

@pedrofracassi
Copy link
Member

I believe i tried that when originally developing invidget, but ended up not doing it due to the lack of a good library to convert it. Most libraries wouldn't render fonts or images correctly.

If anybody wants to pick this up, feel free to, though.

@pedrofracassi pedrofracassi added the enhancement New feature or request label Jul 4, 2021
@jaxxibae
Copy link
Member

jaxxibae commented Jul 4, 2021 via email

@pedrofracassi
Copy link
Member

Good luck!

@Galaxy-Coding
Copy link
Author

@jaxxibae I believe the NPM package called sharp can do that job easily.

@jaxxibae
Copy link
Member

jaxxibae commented Jul 6, 2021

We're using sharp, and the PR is already open, I'm just freaking because the guild icon isn't being rendered

@Galaxy-Coding
Copy link
Author

My bad. Didn’t see #42.

@jaxxibae jaxxibae linked a pull request Jul 23, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants