Skip to content

Instantly share code, notes, and snippets.

@OneWeb
Created November 13, 2020 14:57
Show Gist options
  • Save OneWeb/e596e7dbd776919f76921314a5fecb84 to your computer and use it in GitHub Desktop.
Save OneWeb/e596e7dbd776919f76921314a5fecb84 to your computer and use it in GitHub Desktop.
{# requires twig tweak module to be installed #}
{% set media = content.field_logo_media %}
{% if media[0] is defined and media[0]['#item'] is defined %}
<img src="{{ media[0]['#item'].entity|file_uri|image_style('stockists_carousel_logo') }}" alt="{{ media[0]['#item'].alt }}">
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment