{% load image_tags %}
{% if record.primary_image.original.url %}
    {% with image=record.primary_image %}
        {% oscar_thumbnail image.original "70x70" upscale=False as thumb %}
        <a href="#" data-original="{{ image.original.url }}" class="sub-image">
            <img src="{{ thumb.url }}" alt="{% if image.caption %}{{ image.caption }}{% else %}{{ record.get_title }}{% endif %}">
        </a>
    {% endwith %}
{% else %}
    —
{% endif %}
