Image aspect ratio done right 😍
If you have an image on the page which is 600x200 pixels, what is the chance of it shown exactly with that size? I’d say not likely, because most of the time it’s put inside a container which defined the width and the image is set to
width: %100. But the size of the image is not that important at this point, what is important is that you will have a DOM reflow once the image is loaded.
Dec 19, 2019