If images are not a local file, it's will have an error like below:
This is dom-to-image
in VUE:
shareClick(){
this.shareLoading = true;
let capture = document.getElementById("capture");
domToImage.toBlob(document.getElementById('capture')).then((blob)=>{
var img = new Image();
img.crossOrigin = "anonymous";
img.onload = () =>{
img.src = dataUrl;
capture.innerHTML = '';
capture.appendChild(img);
this.shareLog = false;
this.shareLoading = false;
}
})
},
//domToImage CODE end