Images can't be loaded when I use <CacheableImage>and display <ActivityIndicator> all the time
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.
I have the same problem
@SegmentControl OMG, and how did you do at last
Having same issue
+1
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.
1+
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 ?
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/>