[whatwg] <img> element comments

[re. <img> width= and height=]

On Nov 4, 2006, at 9:01 AM, Alexey Feldgendler wrote:
>
> On Sat, 04 Nov 2006 12:37:32 +0600, Ian Hickson <ian at hixie.ch> wrote:
> ...
>> I'm thinking of only allowing integer values, and requiring them to be
>> equal to the dimensions of the image, if present (and requiring both 
>> to be present if either is present). Would people be ok with that?
> ...
> That's how these attributes could have been defined if we were 
> designing HTML from scratch.
>
> In today's browsers, specifying width and height on <img> different 
> from the actual dimensions of the image forces the image to be resized 
> for display. There is existing content which relies on this.
> ...

In 1998 I used a version of iBrowse for the Amiga that treated <img> 
width= and height= in the way Ian proposed -- as preliminary advice on 
the dimensions of the image, reflowing if the actual dimensions turned 
out to be different. It often produced amusing results, as images 
popped into sizes far larger than the ones the page had asked for.

This situation may have improved with the development of the Web design 
industry since 1998. But I still occasionally come across photo 
galleries, in particular, that use width= and height= as a (very slow) 
alternative to thumbnails. It may be possible to use the Google Images 
corpus to find out just how common this problem is.

-- 
Matthew Paul Thomas
http://mpt.net.nz/

Received on Monday, 6 November 2006 18:49:40 UTC