tsayen / dom-to-image

Generates an image from a DOM node using HTML5 canvas
Other
10.23k stars 1.68k forks source link

CORS problem #315

Closed Starloss closed 4 years ago

Starloss commented 4 years ago

Hi, im getting problems with CORS policy when i try to draw an image that is in the aws (the profile photos), i attach the problem log and the code where i use the dom-to-image. 1 2

The problem isn't the server, because i use an http request without this library and works fine.

Edit: When i use only users without profile image, the library works perfect!

grimace commented 4 years ago

try this:

       let options = { "cacheBust":true }
       domtoimage.toJpeg(node, options)
Starloss commented 4 years ago

try this:

       let options = { "cacheBust":true }
       domtoimage.toJpeg(node, options)

Works perfect, now the screenshot takes all the images without any problem, thanks!

rutikwankhade commented 1 year ago

not working for me. is there any other solution?