Closed tlrobinson closed 6 years ago
SVG data URI probably don't work as background images on web and won't work in react native either. You can use SVG directly instead
They do work on the web.
Well, Image uses a background image on web. Which platform are you saying this doesn't work on
It's not working on the web. I haven't tried react-native.
https://esnextb.in/?gist=ef0b696442ef1de57210471caf8e0902
Regardless, I feel like the use of background images to implement <Image>
is an implementation detail, and this should work on both platforms.
It probably doesn't work on any of the platforms. You can use SVG directly though
The root issue appears to be a stray CSS class that sets the opacity
to 0
. See https://esnextb.in/?gist=70e494967a43938531a28d0dcca8376d
Note the .rn-opacity-1272l3b
class in these screenshots.
Interestingly, opacity: 0
doesn't have an effect on the base64 PNG image, but the base64 SVG image appears when that class is not applied.
I don't have time to create a ticket in RNW right now but will in a few days if someone doesn't beat me to it.
This is fixed now. Thanks!
It seems like the background image isn't getting set for some reason