-
Notifications
You must be signed in to change notification settings - Fork 407
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
issues with svg rendering local icon images in github #620
Comments
@MxNxPx yeah Github replaces images with their proxied version ( 3 options:
|
thanks for the speedy reply @alixander! fyi, i am using d2 v1.0.4 for this. |
@MxNxPx https://cdn.jsdelivr.net/gh/MxNxPx/d2-test@224a8b96b6694d494ba51bc2b32609393a65a7c4/diagram.svg See discussion here: isaacs/github#316 and workaround here: isaacs/github#316 (comment) |
wow, nice find @alixander - i have updated the README embedded image and link so it loads using that snazzy url. thanks! |
🙌 |
@alixander - fyi - i found another alternative approach (although also a bit of a hack) which doesn't need that outside cdn. you can create an html file that pulls in the svg as an iframe and can use the github html preview trick to load the page: html page with iframe
readme link
|
@MxNxPx https://htmlpreview.github.io is also an outisde entity though. probably far less reliable than jsdelivr. jsdelivr feels almost like critical infra now, they're rock solid https://status.jsdelivr.com/?start=20220101&end=20221231 |
When trying to develop locally referencing images in the relative path of the repo, d2 renders the diagram (in svg) totally fine using the --watch flag. Here is an example repo of the setup: https://github.com/MxNxPx/d2-test
But when trying to view the final product on github (via Chrome), the icons in the diagram do not render:
https://github.com/raw/MxNxPx/d2-test/224a8b96b6694d494ba51bc2b32609393a65a7c4/diagram.svg
Any thoughts on what might be the issue?
The text was updated successfully, but these errors were encountered: