i have a gameobject that will change to different image (in different sizes)
But once the sprite changed, it still keep to previous image size

it caused the image out of ratio
I know the 'snap' button will rectify the ratio. But what's the property to change in script? or how can i fix the component, to ensure everytime spritename changed, it will keep the perfect ratio?
Thanks for the help