{% with all_images=product.get_all_images %}
{% for image in all_images %}{% image_thumbnail image.original "850x" upscale=True as thumb %}
{{ product.get_title }}
{% endfor %}
{% if all_images|length > 1 %} {% if all_images|length < 6 %}
{% else %}
{% endif %} {% for image in all_images %}{% image_thumbnail image.original "100x" as thumb %}
{{ product.get_title }}
{% endfor %}
{% endif %} {% endwith %}