Random and filtered hero image

Hi to the Grav community,

I started with Grav by creating an inerited theme of Qwark.
I put the media files in user/pages/images with {% set my_image = page.find(‘/images’).media[‘my-image.jpg’] %} .

After that I wanted my hero image to come from the pages/images folder, so I did this :

Each page of the site is only composed by images.
My final objective is to create a modular page made of hero images from the pages of my website, each hero will take a random picture of the page.

My problem is : how to make each hero image random and filtered differently ? (for example only images including the letter L). I know a randomize function exists but I don’t kow how to apply it with different filters on each hero.

Sorry for my bad english, and also i don’t know anything to code…
Best regards.