templates/bundles/SyliusShopBundle/Product/Show/_Ressource_round_image.html.twig line 1

Open in your IDE?
  1. {% if Ressource.imagesByType('main') is not empty %}
  2. {% set source_path = Ressource.imagesByType('main').first.path %}
  3. {% set original_path = source_path|imagine_filter('sylius_shop_product_original') %}
  4. {% set path = source_path|imagine_filter(filter|default('sylius_shop_product_thumbnail')) %}
  5. {% elseif Ressource.images.first %}
  6. {% set source_path = Ressource.images.first.path %}
  7. {% set original_path = source_path|imagine_filter('sylius_shop_product_original') %}
  8. {% set path = source_path|imagine_filter(filter|default('sylius_shop_product_thumbnail')) %}
  9. {% else %}
  10. {% set original_path = '//placehold.it/400x300' %}
  11. {% set path = original_path %}
  12. {% endif %}
  13. <img src="{{ path }}" id="main-image" alt="{{ Ressource.name }}" class="ui circular image" />