set width/height attribute if not available