Displaying a missing image thumbnail

Discussion in 'HTML & Website Design' started by bigpapa, Jan 21, 2008.

  1. #1
    Hi,

    I am creating an image hosting website and I want to create a thumbnail for missing images.

    For example, if someone inserts a thumbnail to the image and the image is deleted at a later date, I want a "File Deleted" image to display.

    I assume this is done through htaccess, but I could not find out exactly how to do this.

    Any help would be appreciated. Thanks!
     
    bigpapa, Jan 21, 2008 IP
  2. webwurks

    webwurks Well-Known Member

    Messages:
    126
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    118
    #2

    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} \.(gif|jpg|jpeg|png)$
    RewriteRule .* path/to/noimage.gif [L]
     
    webwurks, Jan 21, 2008 IP