vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Resources/views/Product/_mainImage.html.twig line 1

  1. {% if product.imagesByType('thumbnail') is not empty %}
  2.     {% set path = product.imagesByType('thumbnail').first.path|imagine_filter(filter|default('sylius_shop_product_thumbnail')) %}
  3. {% elseif product.images.first %}
  4.     {% set path = product.images.first.path|imagine_filter(filter|default('sylius_shop_product_thumbnail')) %}
  5. {% else %}
  6.     {% if use_webpack %}
  7.         {% set path = asset('build/shop/images/200x200.png', 'shop') %}
  8.     {% else %}
  9.         {% set path = asset('assets/shop/img/200x200.png') %}
  10.     {% endif %}
  11. {% endif %}
  12. <img src="{{ path }}" {{ sylius_test_html_attribute('main-image') }} alt="{{ product.name }}" class="ui bordered image" />