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

mod rewrite - Using "?" when rewriting the URL -

.htaccess: Transfer name to index.php if not directory public -

Admob integration with pygame in android -