How can I request an image from the user, output it and get the src of this image?

I need to request image from the user, then display it on the screen. I also need to get the src of this image for later work. (get the src to be processed by the program)

I only managed to request an image and display it on the screen. But I need to get the src of the image to be processed by the program (src=””)