Capture image on click