0

My html has many automatic links to a PNG repository. When images don't exist (that happens sometimes) I would like lightbox to show a default image saying something like "Non available", instead of showing a blank image.

Can It be done? Thanks.

jm_
  • 631
  • 2
  • 12
  • 20
  • 2
    [jQuery/Javascript to replace broken images](http://stackoverflow.com/questions/92720/jquery-javascript-to-replace-broken-images) – Andreas May 19 '13 at 17:58
  • 1
    The best answer (in my opinion) from Andreas' link: `$('img').one('error', function(){ $(this).attr('src', 'broken.jpg'); });` – Joe May 19 '13 at 18:57
  • 1
    configure the server to serve the error-image when a non-existing image has been requested – Dr.Molle May 19 '13 at 21:19
  • I found much more interesting to add a rewrite rule to appache2 to deal with all broken images. Thanks all. – jm_ May 19 '13 at 22:01

0 Answers0