jQuery/Javascript to replace broken images

A nice StackOverflow thread about using Javascript to manage missing images in web pages.
Those are my favourites tecniques:

Simple Javacript function to be invoked on the img onError event

function ImgError(source){
    source.src = "/images/noimage.gif";
    source.onerror = "";
    return true;
}

One line jQuery code to get the same result

$('img').one('error', function() { this.src = 'broken.gif'; });

Source: http://stackoverflow.com/questions/92720/jquery-javascript-to-replace-broken-images