I have a rectangular image with height greater than width. So resizeMode='cover' is used. It keeps the aspect ratio equal but expands from the center and top portion of the image is not seen. What I am trying to do is to keep the aspect ratio and show the image from the top.
Please try the code in the snack: https://snack.expo.io/@codebyte99/new-addition-to-home-page
code:
<View>
<Image
source={{
uri:
'https://img.kpopmap.com/2017/09/HanYeSul-min.jpg',
}}
resizeMode={'cover'}
style={{ width: 120, height: 120 }}
/>
</View>
Image now
Image what I want to achieve
Image original
I want to align the image from the top so that the head section is seen clearly. We can do that in css by object-fit: cover and object-position: top but how can it be done in react native?



