-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
project:react-native-webIssue associated with react-native-webIssue associated with react-native-web
Milestone
Description
For local icon image files like this:
icon.png
[email protected]
[email protected]
And normal usage code in RN Native:
<Image source={require('./assets/icon.png')} />
RN Native will automatically choose a best size for the current device through pixel ratio.
But on the web, the code require('./assets/icon.png') will load the @1x file, it makes the icon be blurred on high resolution screens like Apple retina-display or almost all of smart phones today.
Maybe a better default action is to load the @2x file (should be a webpack job?), this choice will solve the problem and it load less size of files on network than to load both @1x and @2x.
Hope RN-Web to be more easy to use 🙂
TimPetricola, nicolas-godefroy-dev, joarkosberg, gentlee, exzos28 and 1 more
Metadata
Metadata
Assignees
Labels
project:react-native-webIssue associated with react-native-webIssue associated with react-native-web