Wow, that looks very intriguing! I’m not well versed with Grav yet so bear with me. The header.imageList code would go into a blueprint file, e.g. mytheme/blueprints/gallery.yaml (if gallery.md/html.twig were the page I use this on), yes?
And how come there are two nested loops? I would have expected a singular array structure.
Yeah, it takes a bit to get used to, but it is awesome to use.
But, to answer your questions, the blueprints is correct. I believe I used this when I was learning about blueprints.
As for the template file, you would want it nested under mytheme/templates/gallery.html.twig
And the only reason I have the nested loop is I couldn’t find a way to grab the data without it. I think it has to do with the structure of how Grav saves the content. It ends up looking like this when you use the file field for your images.