I have my image inside an if statement:
if (item.image) historyHtml += '<a href=' + item.image + ' class="image" target="_blank"><img src="' + item.image +'" width="111px"/></a>';
You can use the onerror handler. In the inline form, it looks like this:
<img src="someimage.jpg" onerror="this.style.display='none';" />
1.4m articles
1.4m replys
5 comments
57.0k users