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.

Image Not Rendring in HTML2Canvas

See original GitHub issue

I am facing an issue from html2canvas. when I use $("#id").trigger('click') in order to call a function which generates a canvas like html2canvas(document.querySelector('#CustomImage')).then(canvas => { $("#export_image_src").attr("src",canvas.toDataURL('image/png')); }); as you can see I am returning the “canvas.toDataURL” to an image’s attribute “src” but it display a blank image and in console I am seeing this error 16badec7cbf 2522ms Error loading image I am working on this from 5 hours Please provide the solution

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
Sanjotarmcommented, Jul 8, 2019

I am facing an issue from html2canvas. when I use $("#id").trigger('click') in order to call a function which generates a canvas like html2canvas(document.querySelector('#CustomImage')).then(canvas => { $("#export_image_src").attr("src",canvas.toDataURL('image/png')); }); as you can see I am returning the “canvas.toDataURL” to an image’s attribute “src” but it display a blank image and in console I am seeing this error 16badec7cbf 2522ms Error loading image I am working on this from 5 hours Please provide the solution

Hi @TheMIG1122

Even i am facing same issue, Please can you suggest me what all changes need to be add to get images. Thanks in advance

0reactions
TheMIG1122commented, Jul 11, 2019

Hope this will help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

html2canvas does not render images located in the element
Image is not render is there any problem in my code ? html2canvas(document.getElementById("html-2-pdfwrapper"), { logging: true, letterRendering ...
Read more >
html2canvas not rendering image (externally hosted images)
You can do so by passing one of the option in html2canvas function. html2canvas(document.body, { useCORS: true, //By passing this option in function...
Read more >
FAQ - html2canvas
Why aren't my images rendered? ... html2canvas does not get around content policy restrictions set by your browser. Drawing images that reside outside...
Read more >
html2canvas — does not render images located in the element
I use html2canvas to take the screen shot of the html element but it didn't capture the image in the screen shot. Here...
Read more >
HTML2Canvas does not render full div, only what is visible on ...
JavaScript : HTML2Canvas does not render full div, only what is visible on screen? [ Gift : Animated Search Engine ...
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