This should do it:
var el = document.getElementById('image_X');
el.parentNode.removeChild(el);
You can try it here.
You can neatly wrap that into a function like so:
function removeElement(ele) {
ele.parentNode.removeChild(ele);
}
removeElement(document.getElementById("image_X"));