Some svg strings that work on the browser do not work with st.image
See original GitHub issueExample 1:
Input:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="100">
<clipPath id="clipCircle">
<circle r="25" cx="25" cy="25"/>
</clipPath>
<image href="https://avatars.githubusercontent.com/karriebear" width="50" height="50" clip-path="url(#clipCircle)"/>
</svg>
Output:
Expected:
Example 2:
Input
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="100">
<text x="0" y="50">"I am a quote" - https://avatars.githubusercontent.com/karriebear</text>
</svg>
Expected:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (7 by maintainers)
Top Results From Across the Web
st.image does not render .svg files with other, common tags
As mentioned in this comment, st.image breaks when trying to display .svg files when there are other top-level tags that aren't svg tags....
Read more >Chrome not rendering SVG referenced via <img> element
As you can see I am trying to use an svg file in both an img element and in css as a background...
Read more >Adding vector graphics to the web - Learn web development
This article has provided you with a quick tour of what vector graphics and SVG are, why they are useful to know about,...
Read more >An SVG Primer for Today's Browsers - W3C
Publication as a Working Draft does not imply endorsement by the W3C Membership. ... Someone who has done some work with SVG but...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for that analysis and everything you said makes sense! Also agree with both your footnotes.
Hi @yashshah1, you are more than welcome to take this on. Thank you for the help! We really appreciate it ☺️
Please let us know if you need any assistance. We’ll be happy to take a look at any draft PRs too. Once you’re ready, just submit a PR ready for review. Thanks again!