'Html2canvas return blank image when useCORS is false
I'm using html2canvas to convert a html element (div) to image.
the problem is that when I set the useCORS to true there is an error to fetch my image and when I set it to false the image is downloaded but it's blank on the generated image
This is how I generate image blob data:
const canvas = await html2canvas(compRef.current, {
useCORS: false,
logging: true
})
const image = canvas.toDataURL('image/png')
console.log(image)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
