// Calculate the aspect ratio of the image. // if the width and the height are given. A quick and easy alternative for implementing lazy loading of images is to let a JS … Tags. But in order to load the image in the background and have it displayed only after it is fully loaded, we need to use a bit of Javascript in the