Do you add width and height properties to images in user controls?

Last updated by Brook Jeynes [SSW] 4 months ago.See history

Framework pages (i.e., user controls and common layout files) should have width and height properties specified for all images that are used. This means that the page's layout will be rendered correctly while loading and when the user has images turned off in their browser.

Images that have a height and width property set can improve your page’s load times by a few milliseconds. However, this will cause problems for any responsive behaviour of the page and should be used when appropriate. It is exceedingly unusual for an image in the site layout to not be placed using CSS, so it’s likely if this rule applies to you, you should switch to CSS and background-property.

We open source. Powered by GitHub