Image add crossOrigin settings (#143)#324
Conversation
|
Please describe what your change is achieving / what problem this solves |
|
Oh I see this is for #143. Looks like you just made the changes in SVG, not Canvas |
Sorry, I forgot to change the canvas. It has been modified now. |
|
Hello, are there any questions about this PR? |
| setIsImageLoaded(true); | ||
| }} | ||
| ref={_image} | ||
| crossOrigin={imageSettings?.crossOrigin ?? 'anonymous'} |
There was a problem hiding this comment.
I don't love that this is duplicating the work in getImageSettings. I'd need to see if we can pull the call to that out of our useEffect in here or maybe just pull the default setting out to ensure no potential drift.
|
I was playing around some more and unfortunately hit the one easy case where this is a problem: localhost out to the web (at least on my webserver which is used in the example code to fetch my favicon). Need to think about it a bit more. Defaulting to |
This ensures we have expected snapshots with values and that empty string maps to anonymous.
|
The same issue in antd: ant-design/ant-design#48759. |
No description provided.