Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image: support multiple sources #515

Open
necolas opened this issue Jun 13, 2017 · 1 comment
Open

Image: support multiple sources #515

necolas opened this issue Jun 13, 2017 · 1 comment
Labels
needs: help project:react-native-web Issue associated with react-native-web
Milestone

Comments

@necolas
Copy link
Owner

necolas commented Jun 13, 2017

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

@eternaleye
Copy link

eternaleye commented Mar 2, 2019

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.

@necolas necolas added this to the 0.17 milestone Mar 29, 2021
@necolas necolas added the project:react-native-web Issue associated with react-native-web label Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: help project:react-native-web Issue associated with react-native-web
Projects
None yet
Development

No branches or pull requests

2 participants