Trigger an event before the image shown on the screen?

I am trying to implement a triggering event before the image shown on the screen. The snippet below is working properly to pick an image and it’s showing on the screen. After clicking the CROP the image is showing on the screen. However, After clicking the CROP , it will be shown a custom event like input field to get some information about the images, after that images will be shown on the screen. How can I implement this functionality?