Added factory function for updating image
Added image upload