Bug #24935
closed
Image Adjustments of a "Images Only"-content change width/height attribute of the img element
Added by gert almost 14 years ago.
Updated almost 14 years ago.
Description
Image Adjustments of a "Images Only"-content change the width/height attribute of the corresponding IMG elements.
According to HTML4+/XHTML, width/height are for the intrinsic width/height of the image. It's invalid to use these attributes to change the size of the displayed image (even tough HTML4.x specs say the img attributes should take presedence over the intrinsic values).
Maybe it's not obvious at first sight, that this is a bug, because the html spec is seemingly ambiguous.
What Image Adjustments should do is resize the IMG via css.
http://www.w3.org/TR/html4/struct/objects.html#edef-IMG
(issue imported from #M17454)
The html spec says:
<quote>The height and width attributes give user agents an idea of the size of an image or object so that they may reserve space for it and continue rendering the document while waiting for the image data.</quote>
When using image adjustments in TYPO3, the size is changed on the server side by IM/GM and then a rescaled image is delivered to the client that exactly matches the values given in the width and height attribute,
IMHO this one can be closed.
your quote is irrelevant, but your second argument and your conclusion are valid. should have informed myself better.
<quote>
13.7.1 Width and height
Attribute definitions
width = length [CN]
Image and object width override.
height = length [CN]
Image and object height override.
When specified, the width and height attributes tell user agents to override the natural image or object size in favor of these values.
When the object is an image, it is scaled. User agents should do their best to scale an object or image to match the width and height specified by the author. Note that lengths expressed as percentages are based on the horizontal or vertical space currently available, not on the natural size of the image, object, or applet.
The height and width attributes give user agents an idea of the size of an image or object so that they may reserve space for it and continue rendering the document while waiting for the image data.
</quote>
This clearly allows the use of width and height to scale the image client-side.
So wen can close this one.
No, Pederson, it does not. I have to repeat myself, as you don't seem to understand the spec. It clearly says in the spec:
"All IMG and OBJECT attributes that concern visual alignment and presentation have been deprecated in favor of style sheets."
Your quote is concerned with "visual alignment and presentation", therefore, if this passage is to be considered valid, then width and height would be deprecated. They are not, rendering this passage obsolete.
But since the IMG is scaled server-side, Hasenaus conclusion still holds up: close it.
Also available in: Atom
PDF