Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

i have a site that displays dynamic images whose src is taken from a database.

 

however, some of the image links are broken. is there a way to specify an 'alternate image' if the link is broken..

 

e.g. if an image called 'someImage.jpg' is missing or renamed, then i need a way to display a default image 'default.jpg' instead of displaying the standard red x that indicates a broken link

 

<img src="/path/someImage.jpg">

 

i also cannot check on the server side if the file exists or not, because sometimes it exists but its not a valid image - and its a large database, so i dont want to have to manually review them all.

 

thanks!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...