This worked for me!
I use html2canvas.
And I wrote allowtain and useCORS options.
//html2canvas and download
var canvasPromise = html2canvas(document.getElementById("myHTML"), {
allowTaint: true,
useCORS: true,
foreignObjectRendering: true
});
canvasPromise.then(function(canvas) {
var myImage = new Image;
myImage.crossOrigin="anonymous"
myImage = canvas.toDataURL();
});
Don't forget to describe crossOrigin="anonymouse" in the image!
I hope this article will help you :)