Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Display multiple images in default.md

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

Just started to investigate GRAV. Created my own theme using pure. What I want to do is resize the three images I have loaded in the page. Can't seem to figure it out?

{% for image in page.media.images %}
{{image..html}}
{% endfor %}

The above display all the images, but at their original size. I can get one image to display using ?resize=300,300

However, I would like to display all of the images that may be attached to the page.

I think I'm not understanding how you mix markdown within html/twig and vice versa.

How can I display the multiple images on my page?

Thanks!

10 years ago

Just found the solution in the Recipes!

need to user {{image.cropResize(300,200).html}}

which is all twig I think?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1362 9 years ago
Archive · by Muut Archive, 9 years ago
2 939 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2959 9 years ago
Archive · by Muut Archive, 9 years ago
3 1124 9 years ago