Reputation: 1095
I'm using snack.expo.io for React Native development. In my render() method, I'm including an Image reference like this:
return (
<View>
<Image source={require('./assets/my-image.png')} />
</View>
);
The image displays as expected in the "Android" and "iOS" preview tabs but nothing is displayed in the "Web" preview tab. Any idea what the issue might be here?
Upvotes: 1
Views: 2031
Reputation: 3621
I created expo snack example with image: https://snack.expo.io/@djalik/image-demo
You have to define style for Image in the web version.
Upvotes: 2