Anurag Chitti
Anurag Chitti

Reputation: 21

default source is not working for android in react native

I'm trying to show image placeholder before the actual image loaded from the server.

For iOS, defaultSource prop is working fine but for android the image is not getting displayed.

<Image style={dashBoardStyles.buildingImage} source={{ uri: 'some server image' }} defaultSource={ require('../images/loadingindicatorImage.png')}>

Can anyone help regarding this issue.

Upvotes: 1

Views: 1143

Answers (1)

jagdeep singh
jagdeep singh

Reputation: 21

Please read https://reactnative.dev/docs/image#defaultsource carefully, and you'll find below note.

Note: On Android, the default source prop is ignored on debug builds.

Upvotes: 1

Related Questions