Check out example codes for "image crop using css 1:1". It will help you in understanding the concepts better.

Code Example 1

.img {
	object-fit: cover;         
  	object-position: 100% 0;  //move image position in x direction. 
  	object-position: 0 100%; //move image position in y direction.
}

Code Example 2

.img {
  object-fit: contain;
}

Learn ReactJs, React Native from akashmittal.com