add image uploading function.