question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SVG image tag not work

See original GitHub issue

Sorry, I am not good at english

Hi

I’m trying to capture SVG tag.

http://jsfiddle.net/geekduck/bgzydk8v/2/

I can capture SVG rect and circle tag but SVG image tag.

I use useCORS and I can capture img tag.

Is there any ideas for SVG image tag?

Thanks.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jlichticommented, Jun 5, 2021

Same issue here

2reactions
npmullercommented, Jan 11, 2018

Interesting find - if I present the image’s base64 encoded data in the xlink:href attribute of the image, the image appears in the html2canvas-generated canvas. If I provide html2canvas a relative path to the image, it does not work. e.g. <image id="OpenLayers_Geometry_Point_42754" cx="690.6698311208747" cy="286.4667614893988" r="1" preserveAspectRatio="none" x="683" y="278" width="16" height="16" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABd0lEQVQ4T62Tv0sCYRzGP2eiZdxBST82iYLADGoILmirucmhOaSkoTEsaJGCiJYIJIr6EwKn6A8IrUGi0q2IhshIh7u0FPXiNcXSLjJ6x+/zPp/v8xzvSXx/FMANjFTkCyAO6PXXpQZ/B8solllkqRvV2lrWo4U3XowkeumQFBufPV8BXdI5XvsgIVkkaDx+TSOcT/BojFfFGkCY19rHmGszaVUZh14hmDkjaahi8gEQsWdaA6ab65FzmsZRbp0UmwKg4LLEuHP2/7y6TnU933JvDAuAiqflhKvO73ubUT1pnXhxSgD8+Ozb7Cu2phL4tDwHucV/AfytwlBaJ1GcFAlk+iwxbp0DTVVwpW64L5U/IjgJ4LWvsKvIv4L4NJ1wLsgzW7WH1CtFWHWoLDh+ZuxkYSN7yoMxUXtIVUuPFGXa5mbPJInYfJy/rJobAR91lmiX5pEtXahWe5kdKeTIGE9kSrsitvnPVFNEDw8wWhnFgGvgtb7fO2wpc13ikHF4AAAAAElFTkSuQmCC" style="opacity: 1" fill="#000000" fill-opacity="1" stroke="#000000" stroke-opacity="1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></image> works while <image id="OpenLayers_Geometry_Point_42880" cx="124.9999999916181" cy="79.99999999953434" r="1" preserveAspectRatio="none" x="112" y="67" width="25" height="25" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/path/to/image/on/server/image.png" style="opacity: 1" fill="#000000" fill-opacity="1" stroke="#000000" stroke-opacity="1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></image> does not.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chrome not rendering SVG referenced via <img> element
Chrome browser will not display svg image, if it doesn't have with attribute with value in svg source code. Edit your SVG source...
Read more >
SVG image isn't displaying in Chrome browser - W3 Mind
Chrome browser doesn't support SVG format with <img src=”” > tag anymore. Peoples are facing issues that they aren't able to see their...
Read more >
SVGs not displaying in Chrome (Example) - Treehouse
Did you add the svg inside the img tag in html? If so: that's the problem, because the SVG image tag does not...
Read more >
Image and svg not loading on page - The freeCodeCamp Forum
I have checked the file path and file type everything is ok. It outputs the alt attribute but not the image itself. it...
Read more >
Serve SVG with the Correct Content Type - CSS-Tricks
I use AWS to serve my asset files, including the external svg file where all my images are defined. These SVGs are not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found