fix the bug when changing the width from 300 to 30 then back to 300 the image didn't show