update image upload functionality on front-end