# Image query on pages field

**URL:** <https://forum.getkirby.com/t/image-query-on-pages-field/27641>\
**Category:** Questions\
**Tags:** v3\
**Created:** [January 20, 2023, 2:15pm UTC](https://forum.getkirby.com/t/image-query-on-pages-field/27641 "2023-01-20T14:15:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![plagasul](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/plagasul/32/4199_2.png) [@plagasul](https://forum.getkirby.com/u/plagasul)\
**Post date:** [January 20, 2023, 2:15pm UTC](https://forum.getkirby.com/t/image-query-on-pages-field/27641/1 "2023-01-20T14:15:41Z")

</div>

In a pages field I am trying to show the first image of the parent of the selected page, like this:

```
fields:
  editions:
    type: pages
    query: site.find('works').index.template('edition')
    text: "{{ page.title }} | {{ page.parent.title }}"
    image: 
      query: page.parent.image

```

But, although `{{ page.parent.title }}` works, `page.parent.image` on the image query, does not… I still see the icon both in the modal and in the list.

I was following this example from the pages docs, image query section, which is almost identical:

```auto
image:
  query: page.children.first.image

```

Shouldn’t this work? What am I doing wrong ?

Thanks

---

<div class="post-metadata">

**Author:** ![plagasul](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/plagasul/32/4199_2.png) [@plagasul](https://forum.getkirby.com/u/plagasul)\
**Post date:** [January 20, 2023, 2:17pm UTC](https://forum.getkirby.com/t/image-query-on-pages-field/27641/2 "2023-01-20T14:17:52Z")

</div>

Ah. I see one particularity that is probably causing this… which is that parent’s images are not stored in the parent’s folder, but in a general folder… and uploaded and selected using a files field.

So hmm… I guess I have to read the first selected file from the files field

This worked.

```auto
query: page.parent.selectedimages.toFiles.first

```

I always find the culprit rrright after posting 😃
