On my theme im getting the first image like this
{% set image = p.media.images|first.cropResize(588, 460) %}
<img src="{{ image.url }}" width="288" height="160" alt=""/>
is there any way to get the title of image? Something like {{ image.title }}
On my theme im getting the first image like this
{% set image = p.media.images|first.cropResize(588, 460) %}
<img src="{{ image.url }}" width="288" height="160" alt=""/>
is there any way to get the title of image? Something like {{ image.title }}
Hi zoidberg,
you can use the metafile(there is also an example for alt-text in the docs):
https://learn.getgrav.org/content/media#metafiles