update html element size (except SVG) before image loaded, to avoid visble jump