/*JS*/
$("#{ID_OF_CLOSE_MODAL_BUTTON}").click(function(e) {
const t = document.getElementsByClassName("{YOUR_MODAL_CLASSNAME}")[0].children[0].src;
document.getElementsByClassName("{YOUR_MODAL_CLASSNAME}")[0].children[0].setAttribute("src", ""),
document.getElementsByClassName("{YOUR_MODAL_CLASSNAME}")[0].children[0].setAttribute("src", t);
});
/*JS*/