remove img tags from page

remove img tags from page

Hello,

I have a site with articles with links to images that are on a remote server. Sometimes, however, some images are not displayed because the remote server workload or other reasons.

I want to make sure that an image can not load the website to remove its HTML tag: <img src="unavailable.jpg">

Here is funny code, deleted all images:

  1. $().ready(function() {
        $("img").load(function() {
            $(this).remove();
        });
    });           





How do I make that mistake, ie image can't be loaded to delete, ie <img> tag?