update image upload functionality