mootools/mootools-core — Issue #2142: Image width/height attributes in IE differs from other browsers.
Author: ibolmo
Created: 2011-11-28 15:15:44+00:00
State: open
Labels: semantic, task

If the image is inserted in the DOM, then IE will set width/height to the src's width/height. If there's no src, then it will _still_ set a width/height except to the placeholder's width/height:

![Internet Explorer placeholder example](http://h20000.www2.hp.com/bc/docs/support/SupportDocument/c01881145/c00741752.gif)

TLDR: Typical of IE it decides to mess with the width/height attribute and we should help the developer have a consistent experience.

1. When we set the `src` the image width/height stays the same even if the new src has different dimensions. We could overload and removeAttributes width/height.
2. When we remove width/height attributes it'll reuse the src, if not set it'll use the placeholders. We could setAttribute width/height to 0.

Question is whether this behavior is expected. Need to research what the other browsers, since this behavior is not well explained in the W3C specs.