Panel: unable to show images

And I got another one… I can’t figure out how to show images in my blueprint except in using:

preset: panel

I tried reusing this snippet from the starterkit, but without success.

columns:
  - width: 2/3
    sections:
      images:
        type: files
        template: image
        info: "{{ file.dimensions }}"

I also tried with segments from the docs, but it only shows a No file yet message.

fields:
  downloads:
    label: Downloads
    type: files

I would also like to filter main and vignette eventually, but first thing first!

File%20structure

Could it be the preset? There are only 3 presets: Files, Page, Pages. More info on presets. Also, if you could share your full blueprint it’s better.

Files field will only show something once you have selected something, but there seems to be an error in your blueprint.

The files section will only show something, if the meta data contains the template. It is automatically added once you upload images to the section, but if your existing images don’t have the template applied, they won’t show up.

Oh, so I tried just for fun uploading from the empty image field, and it added this section in my project.fr.txt file (but not in the ‘project.en.txt’ tough).

Downloads:

- 01 Usine C programme couv 6.jpg
- liste-projets-sam.jpeg

Not sure this is what I would like thought, as I liked the simplicity of just dragging images to the folder as well as being able to manage from the panel. May be it just isn’t possible?

What puzzles me is that the ‘preset: page’ is able to show the images… Is it doable to reproduce this behavior without using the ‘preset’?

Here’s a stripped down version of the relevant files.

A field has to be filled in in every language separately, unless you set the translate option to false. The purpose of the field is to create a reference to the file in the content, in the same way you use a pages or users field for related pages or to add an author. If you upload files via the field, they are in fact uploaded to the folder.

If you just want to upload files, without selecting files, use a files section.

I’m afraid I don’t know enough to understand clearly your answer. What is a files section ? I thought this was it…

fields:
  downloads:
    label: Downloads
    type: files

Files section: https://getkirby.com/docs/reference/panel/sections/files

What you define, is a files field.

1 Like

Waaaaaw, that is exactly what I was looking for!
I still have some filtering to do and work out how (if) I can manage the image order from here, but this is already on the right way :wink:

Here’s my current code, if it can be of any help to further kirbyer:

title: Project

columns:
  - width: 2/3
    sections:
      files: 
        headline: Images
        info: "{{ file.dimensions }}"

  - width: 1/3
    sections:
      content:
        type: fields
        fields:
          client:
            type: text
            width: 1/2
          text:
            type: textarea
            width: 1/2
1 Like