List all images in a leaf bundle without listing them in front matter

How could I create a layout that lists all images (.jpg in this example) in a leaf bundle without manually specifying them in the front matter? In the example below i want both dog.jpg and cat.jpg to be listed. Of course there will be a post02, post03 and post04 too…

└── photoblog
    └── post01
        ├── dog.jpg
        ├── cat.jpg

I guess the big trouble comes when I would want to use the <picture> element with both a jpeg file and an avif file. A solution for that would be an added bonus. :slight_smile:

Look at the Page Resources variable. That contains all resources, including the images: