# Image template for files to only accept images doesn't work

**URL:** <https://forum.getkirby.com/t/image-template-for-files-to-only-accept-images-doesnt-work/17040>\
**Category:** Questions\
**Tags:** v3\
**Created:** [January 30, 2020, 8:35pm UTC](https://forum.getkirby.com/t/image-template-for-files-to-only-accept-images-doesnt-work/17040 "2020-01-30T20:35:02Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![fvsch](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/fvsch/32/15908_2.png) [@fvsch](https://forum.getkirby.com/u/fvsch)\
**Post date:** [March 25, 2023, 12:52pm UTC](https://forum.getkirby.com/t/image-template-for-files-to-only-accept-images-doesnt-work/17040/6 "2023-03-25T12:52:41Z")

</div>

> [@pixelijn](#):
>
> I don’t understand the issue

Hmm looks like you’re right.

I think my mistake was trying to use a `template` key for a `type: files` _field_, based on examples I was seeing in the [Blueprint samples](https://getkirby.com/docs/reference/panel/samples).

But double-checking now, it looks like those examples use `type: files` _sections_, not `type: files` _fields_, which is hard to tell because it’s implicit (the `sections` key is not used).

So I did not use a correct _field_ config like this:

```yaml
type: files
label: Cover image
max: 1
uploads:
  # this will use the "accept" config from
  # blueprints/files/cover-image.yml
  template: cover-image

```

Because I already had a template key one level higher, based on copy-pasted examples, which was ignored silently:

```yaml
type: files
label: Cover image
max: 1
# this will NOT use the "accept" config from
# blueprints/images/cover-image.yml
template: cover-image
# so I had to redefine the same "accept" config here
uploads:
  accept:
    # …

```

---

_[View the full topic](https://forum.getkirby.com/t/image-template-for-files-to-only-accept-images-doesnt-work/17040)._
