react-native-web icon indicating copy to clipboard operation
react-native-web copied to clipboard

Image: support multiple sources

Open necolas opened this issue 8 years ago • 1 comments

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

necolas avatar Jun 13 '17 20:06 necolas

~~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.

eternaleye avatar Mar 02 '19 07:03 eternaleye