{% extends "oscar/catalogue/partials/product.html" %}

{% load ocyan_thumbnail ocyanjson %}


{% block product_image %}
    {% ocyanjson "themes" "thumbnail_geometry" "305x305" as thumbnail_geometry %}

    {% with images=product.get_all_images %}
    <a class="product-image" href="{{ product.get_absolute_url }}" aria-label="Product image">
    {% for image in images|slice:":2" %}
        {% if notlazy and forloop.first %}
        {% picture image.original thumbnail_geometry upscale=False alt=image.caption|default:product.title %}
        {% else %}
        {% lazy_picture image.original thumbnail_geometry upscale=False alt=image.caption|default:product.title %}
        {% endif %}
    {% endfor %}
    </a>
    {% endwith %}
{% endblock %}