Using the attribute methods for height and width

* Switched to the attribute methods (setAttribute, getAttribute, hasAttribute, removeAttribute) for width and height due to the unexpected difference in values for .width and .getAttribute("width"). The property appears to be returning the image's width as determined by the style and not the attribute value.