I'm trying to get the actual file name of each images when looping through the image assets folder, which looks like:
{% for image in craft.assets.kind('image').folderId('1').order('filename') %}
<li><a href="#"><img src="{{ image.getUrl() }}" alt="{{ image.title }}"></a></li>
{% endfor %}
I need to be able to include the filename of the image as a data attribute in the <a>
tag. I tried all sorts of variations of {{ image.fileName }} but have had no luck. Can't find a solution searching here. Does anyone know how? Better yet - is there a documentation somewhere showing all the available twig attributes for assets/images?