Parse an image tag from selection and populate the input fields of the media dialog