Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Adding image alt tag to twig template

Started by Muut Archive 10 years ago · 1 replies · 774 views
10 years ago

Can't find a way to add an alt"" tag based on the imagename to every image. In my template i'm adding the images like this:

{% for image in page.media.images %}
<li>
<div class="image-surround">
{{ image.lightbox(1024,768).cropResize(215,215).html }}
</div>
</li>
{% endfor %}

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2283 9 years ago
Archive · by Muut Archive, 9 years ago
2 1497 9 years ago
Archive · by Muut Archive, 9 years ago
2 4748 9 years ago
Archive · by Muut Archive, 9 years ago
1 3563 9 years ago
Archive · by Muut Archive, 9 years ago
3 1622 9 years ago