added the image upload function for photo