Query Language with Image-Object toArray

Hi,
I have a field (relationship) where I try to fetch my images as the options. I have a global Image section on $site where the user can upload all images.
If I set up

query:
  fetch:  site.images
  text: '{{ arrayItem.name }}'
  value: '{{ arrayItem.url }}'

I get the image names with the extensions and I want them without also normally from a image-array the namekey.
But here I get a Object-Array with site.image. if I try to use site.image.toArray it doesn`t work. So how can I change the object to an array in the query language or need I a model/page-method for this?

You can use item for objects.

query:
  fetch:  site.images
  text: '{{ item.name }}'
  value: '{{ item.url }}'

Why don’t you use a files field?

Hi,

Because my mind was connected to the relationshipfield from a discussion I had in a chat about the concept of a gallery with only one upload so that I haven’t thought about the normal file field :slight_smile:

Or did you mean in my global media libary?

Nope, I meant instead of the relationshipfield.