2

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

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for the suggestion, it made me realise I wrote url instead of uri, stupid mistake.
Great! Good luck with your project :)
add a key value key={index}
For some reason I've seen many examples using url which works for iOS but not Android.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.