image.html.twig in Open Social 8.7
Same filename and directory in other branches
- 8.9 themes/socialbase/templates/system/image.html.twig
- 8 themes/socialbase/templates/system/image.html.twig
- 8.2 themes/socialbase/templates/system/image.html.twig
- 8.3 themes/socialbase/templates/system/image.html.twig
- 8.4 themes/socialbase/templates/system/image.html.twig
- 8.5 themes/socialbase/templates/system/image.html.twig
- 8.6 themes/socialbase/templates/system/image.html.twig
- 8.8 themes/socialbase/templates/system/image.html.twig
Default theme implementation of an image.
Available variables:
- attributes: HTML attributes for the img tag.
- style_name: (optional) The name of the image style applied.
See also
File
themes/socialbase/templates/system/image.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation of an image.
- *
- * Available variables:
- * - attributes: HTML attributes for the img tag.
- * - style_name: (optional) The name of the image style applied.
- *
- * @see template_preprocess_image()
- *
- * @ingroup themeable
- */
- #}
-
- {% if style_name == 'social_large' %}
-
- {% set classes = [
- 'hero-avatar'
- ] %}
-
- {% else %}
-
- {% set classes = [
- theme.settings.image_shape ? theme.settings.image_shape,
- theme.settings.image_responsive ? 'img-responsive',
- ] %}
-
- {% endif %}
-
- <img{{ attributes.addClass(classes) }} />