html - Why do images that have a specified height and width render faster than those that do not? -
it general best practice set height , width value <img>
tag render faster, why case?
because if specify width , height, browser can preserve space before downloading image, , continue parsing html below. then, when image being downloaded, fills space.
if don't that, browser doesn't know how space should preserve beforehand. then, html elements below image need moved when image downloaded.
Comments
Post a Comment