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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -