I have a simple react-native application that loads images in a component. The component uses the standard Image component.
<Image source={this.state.ImageSource} style={styles.image} />
I have the following code that initializes ImageSource.
componentDidMount() {
this.setState({ImageSource: {uri: this.props.imageurl}});
}
Image source is an object with uri, e.g., { uri: 'http://localip:123/controller/imageaction/imageid'}.
Images that are less that 1MB in size load without problems. Images that are 1MB or more seem to have issues where they render as a blank image for seeminly forever.
I tried using package react-native-image-progress, and it has the same behavior, similarly failing for bigger images where the loading indicator keeps showing...
I am testing on a slow lower-end LG dumb smart-phone with Android 4.1.2. But in Google Chrome browser, this very phone is able to show large and small images without a problem.
I tried to fix this using android:largeHeap="true" but that didn't cause any change in behavior. Shrinking images makes them able to load, but I need to display big images as well as small.
Thanks for any help.