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

🐛 Bug: Preview image contains missing/breaking SVG logo while /png endpoint works fine #488

Open
KemingHe opened this issue Jan 10, 2025 · 2 comments

Comments

@KemingHe
Copy link
Collaborator

Problem

When following instructions exactly and using SVG logo url to generate preview,

the SVG logo is missing in the generate preview (live, not screenshot):

<img src="https://socialify.git.ci/KemingHe/buckeye-gpt/image?description=1&forks=1&issues=1&language=1&logo=https%3A%2F%2Fgithub.com%2FKemingHe%2Fbuckeye-gpt%2Fblob%2Fmain%2Fpublic%2Fimages%2Ftransparent-buckeye-gpt-icon-512x512px.svg%3Fraw%3Dtrue&name=1&owner=1&pattern=Plus&pulls=1&stargazers=1&theme=Light" alt="buckeye-gpt" width="640" height="320" />

buckeye-gpt

HOWEVER if manually setting it to using PNG image plus the /png endpoint, the image will work fine (live, not screeshot):

<img src="https://socialify.git.ci/KemingHe/buckeye-gpt/png?description=1&forks=1&issues=1&language=1&logo=https%3A%2F%2Fgithub.com%2FKemingHe%2Fbuckeye-gpt%2Fblob%2Fmain%2Fpublic%2Fimages%2Ftransparent-buckeye-gpt-icon-512x512px.png%3Fraw%3Dtrue&name=1&owner=1&pattern=Plus&pulls=1&stargazers=1&theme=Light" alt="buckeye-gpt" width="640" height="320" />

buckeye-gpt

Reference

Similar issue reported in #474 , now with even more reproducibility.

@wei
Copy link
Owner

wei commented Jan 15, 2025

I see, the image seems to work with /image or /svg endpoints as well if a png image is provided. Something is weird with handling of certain svg logos.

https://socialify.git.ci/KemingHe/buckeye-gpt/image?description=1&forks=1&issues=1&language=1&logo=https%3A%2F%2Fgithub.com%2FKemingHe%2Fbuckeye-gpt%2Fblob%2Fmain%2Fpublic%2Fimages%2Ftransparent-buckeye-gpt-icon-512x512px.png%3Fraw%3Dtrue&name=1&owner=1&pattern=Plus&pulls=1&stargazers=1&theme=Light

buckeye-gpt

@wei
Copy link
Owner

wei commented Jan 15, 2025

Could it be related to the use of github url?

This is working fine: https://raw.githubusercontent.com/KemingHe/buckeye-gpt/main/public/images/transparent-buckeye-gpt-icon-512x512px.svg

Config page: https://socialify.git.ci/KemingHe/buckeye-gpt?description=1&forks=1&issues=1&language=1&logo=https://raw.githubusercontent.com/KemingHe/buckeye-gpt/main/public/images/transparent-buckeye-gpt-icon-512x512px.svg&name=1&owner=1&pattern=Plus&pulls=1&stargazers=1&theme=Light

<img src="https://socialify.git.ci/KemingHe/buckeye-gpt/image?description=1&forks=1&issues=1&language=1&logo=https://raw.githubusercontent.com/KemingHe/buckeye-gpt/main/public/images/transparent-buckeye-gpt-icon-512x512px.svg&name=1&owner=1&pattern=Plus&pulls=1&stargazers=1&theme=Light" alt="buckeye-gpt" width="640" height="320" />

buckeye-gpt

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

No branches or pull requests

2 participants