update image upload handling