Reputation: 21
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
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