twitter/bootstrap — Issue #1899: img {height:auto} is overriding height attribute in <img />
Author: maniqui
Created: 2012-02-10 20:43:10+00:00
State: open

**Prologue**

A well-known trick for quicker page rendering and better user experience is to explicitly set the `height` attribute of an `img` (i.e. ``). This will avoid nasty "jumps" while the page is rendering if the height of an image (being downloaded) is known.

Problem is: afaik, the following rule makes it impossible to take advantage of that technique.

```
img {
max-width: 100%;
height: auto;
border: 0;
-ms-interpolation-mode: bicubic;
}
```

Weird as it sounds, It will override the inline attribute value.
I couldn't find any value for `height` (the CSS property, not the `img` property) to "undo" this.

I'm not sure the rationale for this particular property in the above rule, so I wonder if someone could shed some light, and a workaround/fix for this issue.