first close the modal then update the image