in javascript x immagini puoi fare cosi...

codice:
var _hImage = new Image( );

_hImage.onerror = function( )
{
  alert( "Immagine NON esiste" );
}

_hImage.onload = function( )
{
  alert( "Immagine caricata ed esistente!" );
}

_hImage.src = '<url immagine>';
piu' o meno è un'emulazione soddisfacente,
ovvero onerror puo' scattare in piu'casi!