I have a json file
{
"name": "SAM",
"id": "001",
"default_image":"../assets/image.jpeg"
}
In my component, I set a state called profile_image with this data called default_image, but when I use it like this, it throws an error.
<Image
style={styles.image}
source={{uri: this.state.profile_image}}/>
I have given width and height but still it throws an error. I have even tried all these possible formats but no success.
<Image
style={styles.image}
source={{this.state.profile_image}}/>
<Image
style={styles.image}
source={require(this.state.profile_image)}/>