stabilize image upload locally