react-native-cacheable-image icon indicating copy to clipboard operation
react-native-cacheable-image copied to clipboard

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

Open Paper-Ice-Coffee opened this issue 8 years ago • 8 comments

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.

Paper-Ice-Coffee avatar Mar 28 '17 09:03 Paper-Ice-Coffee

I have the same problem

rhwish avatar Mar 28 '17 10:03 rhwish

@SegmentControl OMG, and how did you do at last

Paper-Ice-Coffee avatar Mar 29 '17 02:03 Paper-Ice-Coffee

Having same issue

Satya5614 avatar Mar 31 '17 14:03 Satya5614

+1

windwang avatar Apr 07 '17 07:04 windwang

I am facing the same issue. I need to load images in each row of my listview, the first time to render the listview, some of the images always stuck and display the ActivityIndicator. However, if I close the app, and restart it again, these images are shown correctly. I think the process of cache is already successful, but the rerendering items in listview encounter errors.

gameboyVito avatar Apr 09 '17 04:04 gameboyVito

1+

NickKotowski avatar Apr 11 '17 09:04 NickKotowski

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 ?

colus001 avatar Apr 20 '17 06:04 colus001

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/>

cwjturnleft avatar May 15 '17 21:05 cwjturnleft