responsive image w3schools code example
Example 1: make a background image responsive css
html {
min-height: 100%;
background-image: url(image.jpg);
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}
Example 2: responsive image in css
.responsive_img {
width: 100%;
height: auto;
object-fit: cover;
/* Prevent the image from stretching. So it crops the image to prevent from awkward stretching */
}