object-fit: cover;
<div class="theImg">
<img src="../assets/img/img1.jpg">
</div>
<style>
.theImg{
width: 200px;
height: 200px;
}
.theImg>img{
width: 100%;
height: 100%;
object-fit: cover;
}
</style>
object-fit: cover;
<div class="theImg">
<img src="../assets/img/img1.jpg">
</div>
<style>
.theImg{
width: 200px;
height: 200px;
}
.theImg>img{
width: 100%;
height: 100%;
object-fit: cover;
}
</style>