title: detect image errors django template
body: <p>I pull in image links from several sources so I have a mix images that render and then have problems rendering.</p>
  
  <p>I have many images that return with http error 400, 403 etc.</p>
  
  <p>Am I able to detect this in the django template so that I can render something more suitable than a broken image?</p>
  
  <p>Something like:</p>
  
  <pre><code>{% if ia.image.url %}
                        &lt;img src="{{media_url}}{{ia.image.url}}" alt="#" class="trimimg1" /&gt;
                      {% else %}
                      &lt;img src="{% static 'common/app/images/news-default.jpg' %}" alt="#" class="trimimg1"  /&gt;
                      {% endif %}
  </code></pre>