{% if list == "true" %}

  {% set image_parts = pathinfo(item.img_thumb) %}
  {% set image_basename_thumb = image_parts.basename %}
  {% set image_page_thumb = image_parts.dirname == '.' ? module : module.find(image_parts.dirname) %}

  {{ image_page_thumb.media[image_basename_thumb].resize(500, 500).html() }}

  <div class="__sub-title">
    <p>{{item.sous_title}}</p>
  </div>

{% else %}

  {% set image_parts = pathinfo(module.header.img_thumb_envie) %}
  {% set image_basename_thumb = image_parts.basename %}
  {% set image_page_thumb = image_parts.dirname == '.' ? module : module.find(image_parts.dirname) %}

  {{ image_page_thumb.media[image_basename_thumb].html() }}
  <div class="__sub-title">
    <p>{{module.header.sous_title_envie}}</p>
  </div>

{% endif %}
