Muut
1
Is it possible to attach to responsive images alt text without creating sample-image.jpg.meta.yaml?
{% for image in page.media.images %}
<img class="" {{ image.sizes('80vw').html() }}>
{% endfor %}
combine
alt="{{ page.parent.title }} | {{ page.title }}"
Thanks.
Muut
2
Mhm, maybe like this?
{% for image in page.media.images %}
{{ image.sizes('80vw').html(page.parent.title, page.title, 'myClassName') }}
{% endfor %}
The html() function, outputs the image tag and you can add the alt and title tag. Never tried with responsive images though, but see here:
https://learn.getgrav.org/content/media#htmltitle-alt-classes
Muut
3
Thank you very much, everything works!