question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Images can't be loaded when I use <CacheableImage>and display <ActivityIndicator> all the time

See original GitHub issue

Images can’t be loaded when I use <CacheableImage>and display <ActivityIndicator> all the time, after I reload many times ,The image displayed occasionally. But when I use <Image> and use the same uri,it has no problems.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

2reactions
cwjturnleftcommented, May 15, 2017

I dig in a bit and found that network status is not updated correctly. As a temporary workaround, specifying props like below would make it work.

<CacheableImage checkNetwork={false} networkAvailable={true /*If you check network connectivity and hide component from higher level, otherwise use flag from your own network connectivity check routine*/} ...otherProps/>

1reaction
colus001commented, Apr 20, 2017

I have fixed this problem by wrapping CacheableImage with a View

<View style={styles.container}>
  <CacheableImage
    resizeMode="cover"
    style={styles.image}
    source={PLACEHOLDER}
  />
</View>

const styles = StyleSheet.create({
  container: {
    width: thumbnailWidth,
    height: thumbnailWidth,
    borderWidth: 1,
    borderColor: 'black',
    borderRadius: 2,
  },

  image: {
    flex: 1,
  },
})

Is this bug in react-native-responsive-image ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Activity indicator in SdWebImage issue - Stack Overflow
Its not a placeholder, it simply animates when its loading and stops animating when the completion block is called. Its everything you have...
Read more >
Loading indicator disappears randomly. · Issue #447 - GitHub
I found the loading indicator can disappear sometimes in such a scenario, but I have not found a consistent repro yet.
Read more >
Caching images in React Native: A tutorial with examples
Image caching essentially means downloading an image to the local storage in the app's cache directory (or any other directory that is ...
Read more >
Preview without rendering in After Effects - Adobe Support
To manually preview (scrub) only the frames that are already rendered and cached into the RAM cache, press Caps Lock before dragging the...
Read more >
Can't Upload Images to WordPress Media Library? - WP Engine
Is your WordPress media library not loading or not showing images? ... We'll then show you how to solve your WordPress image upload...
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