Html2canvas does not capture image

html2canvas.js does not capture the image. it leaves an empty place where the image takes place.

function capture() { html2canvas(document.body, { allowTaint: true, logging:true, onrendered: function(canvas) { imagestring = canvas.toDataURL("image/png"); console.log(imagestring); document.body.appendChild(canvas); } }); } 

I have tried a lot, but I can not find a solution.

Help is appreciated :)

+7
source share
1 answer

It works when I host it on the server. Security restrictions lead to failure.

+10
source

All Articles