User Experience
Height and Width challenged
Freshness Warning
This blog post is over 21 years old. It's possible that the information you read below isn't current and the links no longer work.
5 Aug 2003
Could someone tell me why height and width attributes are needed for images? Non-graphic browsers don’t use them, and graphic browsers should be smart enough to figure out the size on their own. The first few bytes of common image formats contain the image’s size, so the browser doesn’t even need to download the whole image.
It’s silly to require people to add metadata to HTML when that metadata is something easily calculated by the computer. That’s what we have computers for: to reduce the amount of manual work. Most authoring tools can automatically add the attributes, but the work’s still be done on the wrong end. This shouldn’t be an authoring function, it should be a rendering function.