//Local import (relative path)
<Image source={require("./assets/snack-icon.png")} />
//External import (web path) you should specify the width and height
<Image source={{uri:"https://picsum.photos/200", width:200,height:200 }}/>
<Image
source={require("relative_path_to_image")}
style={{ width: 100, height: 100 }}
/>
import React from "react";
import { StyleSheet, View, Image} from "react-native";
const Test = () => {
return (
<View>
<Image source={require('./images/orangutan.jpg')} style={{width: 300, height: 300}} />
</View>
);
};
const styles = StyleSheet.create({
container: {
height: 200, width: 200
},
});
export default Test;
<Image style={{height: 200, width: 200}}
source={require('./images/orangutan.jpg')}
/>
<Image //change imagePath with the real path of your image, for example ./src/image/image.jpg
source={require("imagePath")}
/>
yarn add react-native-image-viewing