What is the best practice for including image dimensions in HTML code. I had a discussion with someone about which is faster for rendering, does it matter? I placed the image dimensions in the css attribute as the image dimensions would be easier to change in one place. Has anyone ever tested rendering speed on either?
Share
If the image has to be rendered to a smaller rectangle than what is his original size, then the browser needs to do a scale operation and that requires time.
Providing the width and the height will not really help speed if not for layout purposes.