update image upload mechanism