title: Replace invalid image url with 404 image
body: <p>I don't know if this is possible or not, I have an image host that I've made myself. I need some last tweaks with it.</p>
  
  <p>Whenever an image has been deleted or is an invalid image url, it should replace with an 404 image, so for example if someone adds this:</p>
  
  <blockquote>
    <p><a href="http://imagehosturl.com/i/34njk5n.jpg" rel="noreferrer">http://imagehosturl.com/i/34njk5n.jpg</a></p>
  </blockquote>
  
  <p>But it's an invalid link, so I need it to show:</p>
  
  <blockquote>
    <p><a href="http://imagehosturl.com/img/notfound.jpg" rel="noreferrer">http://imagehosturl.com/img/notfound.jpg</a></p>
  </blockquote>
  
  <p>Which is like this:</p>
  
  <p><a href="http://tinypic.com/images/404.gif" rel="noreferrer">alt text http://tinypic.com/images/404.gif</a></p>
  
  <p>I do know that <code>.htaccess</code> can do this with it's <code>ErrorDocument 404</code>, but I have one already when a user access to an invalid page, so it would show the 404 page.</p>
  
  <p>So whenever a user hotlinks an image and it's invalid or is deleted, I need it to be replaced with the 404 image.</p>
  
  <p>How can I make this?</p>