I faced a problem as to remove image with JS code like a...
... document.getElementById(\'image_X\').src=\'\'
Try using:
document.getElementByID("").style.visibilty="hidden";
when you do not want to show the image and
document.getElementById("").style.visibility="visible";
when you want to show the image.