img { width: 100%; height: 100%; object-fit: contain; }
overflow: 'hidden', backgroundSize : 'contain',
Just apply without any changing any code img { width: 100%; }