Depending on how you get the images, this may change.
<html> <body> <img src="<dynamic handler url>" alt="My Username" onError="this.src='defaultProfile.jpg';" /> </body> </html>
Here's how you do it in ASP.NET.
Designer -
<asp:Image ImageUrl="NonexistentImage.Jpg" ID="profileImage" Height="50" Width="50" runat=server />
Code for (C #)
profileImage.Attributes["onerror"] = "this.src='http://www.cs.uofs.edu/~olivetoj2/blah.jpg';";
This works great for me.
source share