Simple Javascript Snippet to Replace Broken Images

Handle the onError event for the image to reassign its source using JavaScript:

function imgError(image) {
    image.onerror = "";
    image.src = "/images/noimage.gif";
    return true;
}
<img src="image.png" onerror="imgError(this);"/>

You can also do this without a JavaScript function:

<img src="image.png" onError="this.onerror=null;this.src='/images/noimage.gif?x92026';" />

Source