Always Specify Image Dimensions to Avoid CSS Reflow/Repaints

I took an hour the other day and dove into helpful documentation to avoid CSS Reflows and Repaint, but I came up pretty short; in modern browsers, most of these things don’t add to perceived page load in any significant way.

Except one thing that always irks me:

Always specify a width and height for all images. This allows the browser to render the page even before images are downloaded. Otherwise the browser will require a reflow and repaint once the images are downloaded, re-orienting content and disorienting the user.


Posted

in

by

Tags: