How can I use taxonomy with images metadata?

Hi there, I have some images inside my page.
Each image is associated with a metadata file like this:

img01.jpg
img01.jpg.meta.yaml
img02.jpg
img02.jpg.meta.yaml
img03.jpg
img03.jpg.meta.yaml

Each yaml file has something like this for example:

description: a test description
taxonomy:
    tag: [blue,red,green]

How can I loop and filter only the “red” tagged images for example ?
I’m trying this on my template, but it’s not working

{% for myimage in taxonomy.findTaxonomy({'tag':['red']}) %}
    <li>{{ myimage.description }}</li>
{% endfor %}

I also tried using page.media.images but no luck.

Any tip ?

Cheers

I think I should have rephrased my questions and asked instead
"Is this possible ?".

Nevertheless I think I have found an alternative to achieve my goal.
I have changed my yaml file to look like this:

description: test description
color: red

And them on my template I’m using something like this:

{% for myimage in page.media.images %}
   {% if myimage.color == "red" %}
      {{ dump(myimage.description) }}
   {% endif %}
{% endfor %}

Any thoughts ?

If that works, I think it looks like a solid solution. Media YAML just supports standard yaml syntax for storing attributes, no need to make it more complex than it needs to be. Usually the simplest solution is the best.