(Bug 4819) Reset width/height to auto to override HTML attribute

Reset the width/height to auto first before applying a max-width/height. This
is to fix distortion of non-square images (where one dimension > 75px)