Set image width/height attributes on resize