Documentation of grav objects

In the post!/general:image-logo a very nice way of using the grav page object is shown.
Assuming that I have a folder pages/images, that holds all my images, I wonder if it is possible to iterate through an array of all that images. So this would be an easy way to generate a gallery.
I tried something like this:

{% for oPage in pages.find('/images').media['*.jpg'] %}
{{ oPage.url }}
{% endfor %}

but it didn’t work.
Where can I find a detailed documentation of grav objects?

We do intend to take our code and generate some API documentation for developers. The code in Grav is not especially complicated and it’s pretty well documented as is, so the easier approach right now is to just have a look in the code to see what methods are available.

The question you are asking is completely doable, and you will see if you look in the Media Object you will see this images() method that returns an array of images as Medium objects. Then you can use Twig’s array handling to loop over them:

{% for img in pages.find('/images').media.images %}
<li>{{ img.html }}</li>
{% endfor %}

This will grab all the images in the directory and output them with as an <img> in an unordered list

Great! That’s it! Thanks a lot!

Just a small issue: When the extension of the files (e.g. JPG-Files) is in uppercase, the files are not treated as images. is this intentionally so?

No, that sounds like a bug, it should work for JPG, JPEG, jpg, or jpeg. really it should be lowercasing all the extensions. Can you create an issue for this?

Ok, opened an issue…