Button that user to click to upload and replace an image

Hi all

Need to work out a way to add a button that a user can click and upload a new image (photo or upload) and replace an existing image.

Have the image clickable with an action that goes to a modal with an update form.

Also could have pencil icon in corner of photo as the clickable element.