{% load thumbnail %}
<a href="{{ banner.link }}">
    {% thumbnail banner.get_image size as im %}
        <img class="{{ banner.slug }} banner" 
          width="{{ width }}" height="{{ height }}"
          src="{{ im.url }}" alt="{{ object.title }}" 
        />
    {% empty %}
        <!-- Provide banner image -->
    {% endthumbnail %}
</a>
