Single work

document.addEventListener("DOMContentLoaded", function() { document.querySelectorAll("img").forEach(function(img) { img.onerror = function() { this.style.display = "none"; }; }); });