Djakninn
Djakninn

Reputation: 227

[React Native]Images don't load in Android

I have the following line of code that renders an image from a correct url(I checked it in the browser):

<Image source={{ url: group.Image }} style={styles.image} />

This works fine in iOS but on Android the images rendered blank, their size is correct but there's no actual image there.

RN version: 0.39

Upvotes: 2

Views: 1694

Answers (1)

vaklinzi
vaklinzi

Reputation: 2003

I would try with the example from Facebook's documentation (https://facebook.github.io/react-native/docs/images.html):

<Image source={{uri: 'https://facebook.github.io/react/img/logo_og.png'}}
           style={{width: 400, height: 400}} />

Check whether it works with this snippet of code. If it works maybe you have something wrong inside your styles.image which cannot be said without showing it to us.

Upvotes: 2

Related Questions