Height and Width challenged

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.

Jo Cit
December 16, 2004 8:06 PM

The HEIGHT and WIDTH attributes are (a) optional, and (b) VERY useful.

If you don’t like them, don’t use them. You miss out on a feature that improves usability for your readers. In fact, you are sacrificing their usability for yours. How very kind of you. But hey, it’s your choice. The HTML standard never demands that you give that information.

But these pieces of information are very useful. Suppose you have a page with a table in it, and in the first column of that table is an image. The width of the table, and the positions of all elements in the other columns (in ALL rows, not just the one with the image), is determined by the width of the image - which means the browser has to get (at least some of) the image before laying out that table. (By the way, you can use these to cause an image to be stretched, too. It’s not only to duplicate what’s in the image file already.)

Perhaps what we need is a feature at the authoring stage: Zip through every HTML file, find every IMG tag, if it doesn’t have dimensions add them, if it has different dimensions mention it (maybe the image has changed). This means that the information is there for the browser, but you as the author don’t have to worry about it.

Tell you what: If you’re interested, I will WRITE you a program to do the job. The effort involved will be well spent, justifying a perfectly good feature. :)

Manuel
December 10, 2005 7:24 PM

Did anyone found the program to add dimentions to height and width as mentioned in this comments? I would be very interested in getting such script, thanks

Paul D
June 4, 2006 6:40 AM

I like AK’s idea of “how can we make the technology better”. It’s surprisingly hard to think laterally or differently!

Now about Andrew Clover’s suggestion of a new header tag with information about the dimensions of images in the page — the header could (by the order of image data, or a tag or something that describes the image purpose: bug, background, header) give hints on which images to download first for an even smoother user experience.

And you would not need an extra HEAD request to get it, because a normal request retrieves the html header first, and the information would then be available for rendering

Nice!

JAVTiamat
June 13, 2006 10:20 PM

There is Carrick Image Tagger, but it is very old software.

JAVTiamat
June 17, 2006 4:16 PM

If anybody finds a good piece of recent software, post it for all, please.

These are the last 15 comments. Read all 32 comments here.


Your comments:

Text only, no HTML. URLs will automatically be converted to links. Your email address is required, but it will not be displayed on the site.

Name:

Not your company or your SEO link. Comments without a real name will be deleted as spam.

Email: (not displayed)

If you don't feel comfortable giving me your real email address, don't expect me to feel comfortable publishing your comment.

Website (optional):

Lijit Search

Best Of

Recently Read

Get More

Subscribe | Archives

Recently

Thanks O'Reilly (Jun 29)
Captcha usability
BarCamp Sacramento today (Apr 26)
A short report from Barcamp Sacramento.
Barcamp Sacramento (Apr 16)
BarCamp is coming to Sacramento
Chrometa in Inc (Jan 14)
A local startup gets some national ink.
Scrum introduction (Jan 10)
Getting a handle on the Scrum project methodology.
Unfriendly returns (Dec 27)
Toys R Us blocks returns. You can bet I'll do all my shopping at a store with a friendlier return policy in the future.
The ongoing Comcast saga (Dec 27)
Using Twitter as a customer service tool.

Subscribe to this site's feed.

Elsewhere

Feed Crier
Get alerted by IM when your favorite web sites and feeds are updated.
SacStarts
The Sacramento technology startup community.
Pinewood Freak
Pinewood Derby tips and tricks
Del.icio.us
My tagstream at del.icio.us.
Waddlespot
My son's Club Penguin community. News, blogs, tips, and tricks.

Contact

Adam Kalsey

Mobile: 916.600.2497

Email: adam AT kalsey.com

AIM or Skype: akalsey

Resume

PGP Key

©1999-2009 Adam Kalsey.
Content management by Movable Type.