[chore]add JS code to dismiss the chosen images