I have a query regarding tag. I want an image to take entire width of parent which I do using alignSelf:stretch, but I also want the height to be according to the aspect ra
You can calculate the image height based on the width/height ratio.
So if the image originally is 200x100, after setting its resizeMode to stretch:
var deviceWidth: Dimensions.get('window').width;
...
myImage {
width: deviceWidth,
height: deviceWidth * 0.5
}
I know maybe it is not the best practice, but it helped me a lot with images of all sizes that needed to mantain a certain relation with other images, etc.