Image `defaultSource` not loading

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
alihariscommented, May 14, 2017

For mine it started worked once I set the backgroundColor for Image.

<Image resizeMode="cover"
    defaultSource={require('../assets/placeholder-image.png')}
    source={{ uri: rowData.thumbnail }} 
    style={{ backgroundColor: '#f1eff0', height: 150, width: 150 }} />
2reactions
hughvidoscommented, May 11, 2017

Just hit the same issue. borderRadius={1} was enough to fix for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Image Defaultsource not working on android
Here is my code. if I load the image as source then is working perfectly. but in defaultSource it is not working.
Read more >
react native: How to set Image defaultSource on Android
I have tried using @Ravi Raj's answer but seems not related to failure on loading image. Beside the answer will make the image...
Read more >
React Native Display Default Source Image While Loading ...
Hello friends, In today's tutorial we would learn about defaultSource={} Image component prop. It is used to show a default Placeholder ...
Read more >
[Image] loadingIndicatorSrc / defaultSource not working as ...
[Image] loadingIndicatorSrc / defaultSource not working as expected. mkonicek. Moved from https://github.com/facebook/react-native/issues/5017.
Read more >
Image - React Native
A static image to display while loading the image source. Type. ImageSource. Note: On Android, the default source prop is ignored on debug ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found