As a web architect, one of the many issues is asset management. And the most significant issue in assets is images. A naive approach would be to set an image and let the browser resize the image via CSS:
CSS
img {
height: 100%;
width: 100%;
object-fit: contain;
}