How to download PNG result of Plot.image with imported images #2443
Answered
by
Fil
quillcraft
asked this question in
Q&A
-
|
How i can download PNG result of Plot.image without "Oops, an unexpected error occurred"? |
Beta Was this translation helpful? Give feedback.
Answered by
Fil
Jul 9, 2026
Replies: 1 comment 1 reply
-
|
This is due to CORS protection, where your browser prevents reading back from an image that was "tainted" by potentially unsafe sources. If you can make the images accessible with the The code would then look like this: |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
quillcraft
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is due to CORS protection, where your browser prevents reading back from an image that was "tainted" by potentially unsafe sources.
If you can make the images accessible with the
crossOrigin: "anonymous"option (https://observablehq.com/plot/marks/image#image-options), it will work. Usually the way to do so is to use a cors proxy.The code would then look like this: