Want to display user's choice of image elsewhere

I’m building an app where the user is prompted to “choose an image”, and this popup with repeating groups will show:

When the user chooses an image, the popup closes, but I want the chosen image to display on the page in the image uploader that says “click to upload an image”

A simple JS variable to store the user’s choice until the listing is created would be perfect, but I can’t do that. Anyone know how I can solve this issue?