Select image from "assets" in Panel

Hello,

I’m reading this post where it is explained how to select images in panel from an other page, and was wondering how to select images from assets folder for exemple.

fields:
    logo:
      label: Logo menu
      type: select
      options: query
       query:
          page: the_name_of_page
          fetch: files

Edit: It is to custom a navigation with some logo.

Thank you.

You can’t query the assets folder from the panel, at least not by default. You could, however, create a custom field that does that.

Or you could use site images, i.e. put the images directly into the “root” of the content folder and then query that.

The idea was to make these icons invisibles for the user (or make it impossible to delete) but if I put logos in the root of content folder there will be visible in Site parameter.

If you don’t put any other files into /content, you could hide the files from the user:

https://getkirby.com/docs/panel/blueprints/file-settings#hide-files

I did not saw this option before, thank you, It will do the job :slight_smile:

I was too fast to close the post in solved :frowning:

It works with all others page name but, how do you query the site page?

Should be

fields:
    logo:
      label: Logo menu
      type: select
      options: query
       query:
          page: /
          fetch: files

It’s late I think I should go and sleep !! ahah
Thank you @texnixe

Good night, then :slight_smile: