HI Guys,
as a grav rookie i need some support.
i try to print a blog image in the blog_item.html.twig and need to add a class to it.
the default markup seems to be:
{% set header_image = page.header.header_image|defined(true) %}
{% set header_image_width = page.header.header_image_width|defined(680) %}
{% set header_image_height = page.header.header_image_height|defined(400) %}
{% set header_image_file = page.header.header_image_file %}
{% if header_image %}
{% if header_image_file %}
{% set header_image_media = page.media.images[header_image_file] %}
{% else %}
{% set header_image_media = page.media.images|first %}
{% endif %}
{{ header_image_media.cropZoom(header_image_width, header_image_height).html }}
{% endif %}
Can someone help me to get more familiar with the twig and how to get the image printed with an additional class in the <img> - tag?