I want to make an image fully responsive Such that when the size changes the image changes in fixed ration and not at random

This is the initial componant and then when I contract it. When I shrink the image should shrink maintaining aspect ratio

image

image