{% load static %}
{% load thumbnail %}
{% if fragment.image %}
 {% with fragment.image.info.image_file as image %}
 {% if image|is_portrait %}
  {% thumbnail image "x110" format="PNG" crop="center" as im %}
   <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
  {% empty %}
   <img src="{% static 'egonomy/img/empty.gif' %}" width="110" height="110" class="placeholder" />
  {% endthumbnail %}
 {% else %}
  {% thumbnail image "110" format="PNG" crop="center" as im %}
   <img src="{{ im.url }}" width="{{ im.width }}" height="{{ im.height }}"/>
  {% empty %}
   <img src="{% static 'egonomy/img/empty.gif' %}" width=110" height="110" class="placeholder" />
  {% endthumbnail %}
 {% endif %}
 {% endwith %}
{% else %}
   <img src="{% static 'egonomy/img/empty.gif' %}" width=110" height="110" class="placeholder" />
{% endif %}
   <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewbox="0 0 1 1" preserveAspectRatio="none">
       <path d="{{ fragment.coordinates }}" stroke="red" stroke-width=".02" fill="red" fill-opacity=".3" />
   </svg>