react-native-web
react-native-web copied to clipboard
Image: support multiple sources
Image can support an array of sources, one of which is selected based on the layout dimensions of the image.
https://facebook.github.io/react-native/docs/image.html#source https://github.com/facebook/react-native/blob/master/Libraries/Image/Image.ios.js https://github.com/facebook/react-native/blob/master/Libraries/Image/Image.android.js
~~The <picture> element may be a viable implementation strategy for this; IE (non-Edge) and Firefox < 38 lack support for it, and Firefox < 52 had it disabled by default, but modern browsers support it uniformly.~~
~~Beyond that, an <img> fallback inside the <picture> should make it work reasonably in the remaining cases.~~
Reading more closely, the available media queries that are supported for <picture> don't express the correct conditions for what <Image> wants - however, <img srcset="..."> at least supports width.