Answers for "react native limit image size"

2

display image as big as possible react native

<Image style={{ flex: 1, width: "100%", resizeMode: "contain" }} source={{ uri: "https://picsum.photos/200" }}></Image>
Posted by: Guest on July-21-2021
0

relative width and height image react native

const dimensions = Dimensions.get('window');
const imageHeight = Math.round(dimensions.width * 9 / 16);
const imageWidth = dimensions.width;

return (
   <Image
     style={{ height: imageHeight, width: imageWidth }}
   />
);
Posted by: Guest on July-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language