Reputation: 1727
I am using logo.png and if width: 50
and height: 50
(see screenshot_1) then only some part of the image is viewable on the entire image. Now if width: 100
and height: 50
(see screenshot_2) the entire image is seen but I want the entire image with small dimensions how can I do that? I tried different values of width and height but doesn't work?
Original image dimensions are: 50 X 26
Screenshot1:
Screenshot2:
Upvotes: 0
Views: 78
Reputation: 309
use a Property called resizeMode:'contain' in the image style and mention your width and height
<Image style={{width:'your_width',height:'your_height',resizeMode:'contain'}} />
Hope that helps
Upvotes: 2