import {
Image,
Dimensions,
} from "react-native";
const screen = Dimensions.get("window");
Image.getSize(this.state.image_url, (width, height) => {
//full image to screen width (Change screen.width to pixel you want)
let imageWidthRatio = width / screen.width;
let imageHeight = height / imageWidthRatio;
this.setState({ width: screen.width, height: imageHeight });
});
<Image
style={{
width: this.state.width,
height: this.state.height,
alignSelf: "center",
}}
source={{ uri: this.state.image_url }}
/>