Using the image gallery sometimes some images fail to load and I get a blank screen. Its worth noting that this happens on iOS devices.
Looking more into this, I created a custom img component and logged the error and I get this => Error decoding image data <NSData 0x6000030192f0; 82644 bytes>
Using the image gallery sometimes some images fail to load and I get a blank screen. Its worth noting that this happens on iOS devices.
Looking more into this, I created a custom img component and logged the error and I get this =>
Error decoding image data <NSData 0x6000030192f0; 82644 bytes>
this is how my component looks at the moment :
private getCustomImageComponent = (imageProps: any) => { const { width, height } = commonConstants.viewport; return ( <Image {...imageProps} onError={({ nativeEvent: { error } }) => { console.log(error); }} style={{ width: width, height: height }} resizeMode="contain" /> ); };
`
<Gallery
style={[styles.gallery]}
images={[{ source: this.props.primaryImage }]}
imageComponent={this.getCustomImageComponent}
/>
Version: "react-native-image-gallery": "^2.1.5", "react": "^16.6.3", "react-native": "^0.58.5",