Template not set with image upload

When uploading images in the panel, it creates an text file for the image, but it’s empty. So no template is set.

How do I make sure the image template is set?

How do you upload those files? Cia a files section? A files field? A files section has a template option that defines which template should be assigned to the files.

A files field has the upload option: https://getkirby.com/docs/reference/panel/fields/files#upload-options, where you can set the template. Same for the textarea field’s upload option.

Thanks for the quick reply.

It’s with a “preset: page”, so there is a file upload on the right hand side.

The documentation you pointed out shows how the template is defined for a upload option. But how do I define that for the preset page files upload?

  template: sometemplate

Yes, that works!

Ah, it’s a preset thing, totally overlooked this.

Thanks you for your help!

You are welcome.

Yes, the presets work a little bit differently than a “standard” page blueprint with sections, but not much, and as far as I’ve looked into it, you have basically the same options for customising the files and pages sections.

1 Like