react-native: Image `defaultSource` not loading
Issue Description
Image defaultSource
not loading. It was loading in the previous version but now it’s not loading.
Steps to Reproduce / Code Snippets
<Image source={{uri:
${Constants.BASE_URL}${data.icon}}} defaultSource={require('image!noimage')} style={styles.detailImage}/>
Expected Results
should show default image
Additional Information
- React Native version:0.33
- Platform(s) (iOS, Android, or both?): iOS
- Operating System (macOS, Linux, or Windows?): macOS
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 17 (7 by maintainers)
For mine it started worked once I set the backgroundColor for Image.
Just hit the same issue. borderRadius={1} was enough to fix for me.
I’ve noticed the same behavior with RN 0.43.3. In some cases
defaultSource
doesn’t show while in other cases it works as expected. As a workaround I useblurRadius={0}
on the Image to properly show the default source.Assumption: Problem could be related to the size of image. In my case defaultSource image is kinda low (width 40px). It shows correctly when shown as a thumbnail of small size but it doesn’t show when rendered to a larger size (almost full device screen).
Having the same issue with RN 0.39.
@JulianCurrie, when I set ‘backgroundColor: white’, defaultSource is loading.
@leeight on 0.33 default Image is not loading. Is master on 0.33 or 0.34 rc ?