I want to filter the image uploaded in the file archive into a "template" and bring it to the three image areas

I have a question. I want to know what I did wrong.
I want to upload the image to the archive at once and bring the image from the archive from the three slides in the page.

This is the panel composition.

title: Post

icon: ๐Ÿ“–

status:
  draft:
    label: ์ดˆ์•ˆ
  unlisted:
    label: ๋น„๊ณต๊ฐœ
  listed:
    label: ๊ณต๊ฐœ

tabs:
  mainpage:
    label: list
    icon: text
    columns:
      - width: 1/2
        fields:
          thumbnailset:
            label: ์„ฌ๋„ค์ผ ์ด๋ฏธ์ง€ ๊ฐฏ์ˆ˜๋ฅผ ๋จผ์ € ์„ ํƒํ•œ ํ›„, ์„ ํƒํ•œ ๊ฐฏ์ˆ˜์— ํ•ด๋‹นํ•˜๋Š” ์นธ์— ์ด๋ฏธ์ง€๋ฅผ ์—…๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค.
            type: radio
            options:
              onbtnfour: ์ด๋ฏธ์ง€ 4์žฅ
              onbtnthree: ์ด๋ฏธ์ง€ 3์žฅ
              onbtntwo: ์ด๋ฏธ์ง€ 2์žฅ
              onbtnone: ์ด๋ฏธ์ง€ 1์žฅ 
              xbtn: ์ด๋ฏธ์ง€ ์—†์Œ
      - width: 1/2          
        fields:
          thumbcolor:
            label: ์ด๋ฏธ์ง€๊ฐ€ ์—†์„ ๊ฒฝ์šฐ ์›ํ•˜๋Š” ์ƒ‰์ƒ์„ ์„ ํƒํ•˜์„ธ์š”. ๋‹จ์ƒ‰ ์นด๋“œ๋กœ ๋ณด์—ฌ์ง‘๋‹ˆ๋‹ค.
            type: color
            editableAlpha: true # (optional) if set to false, alpha value controls are not displayed
            default: "#fff"

      - width: 1/4
        fields:
          coverone:
            label: ์„ฌ๋„ค์ผ - 1 / 4
            type: files
            layout: cards
            template: image
            info: "{{ file.dimensions }}"
            uploads: false
            max: 1
            image:
              ratio: 5/4
              cover: true
            size: small
            help: ํ•œ ์žฅ๋งŒ ์„ ํƒ๋ฉ๋‹ˆ๋‹ค.

      - width: 1/4
        fields:
          covertwo:
            label: ์„ฌ๋„ค์ผ - 2 / 4
            type: files
            layout: cards
            template: image
            info: "{{ file.dimensions }}"
            uploads: false
            max: 1
            image:
              ratio: 5/4
              cover: true
            size: small
            help: ํ•œ ์žฅ๋งŒ ์„ ํƒ๋ฉ๋‹ˆ๋‹ค.

      - width: 1/4
        fields:
          coverthree:
            label: ์„ฌ๋„ค์ผ - 3 / 4
            type: files
            layout: cards
            template: image
            info: "{{ file.dimensions }}"
            uploads: false
            max: 1
            image:
              ratio: 5/4
              cover: true
            size: small
            help: ํ•œ ์žฅ๋งŒ ์„ ํƒ๋ฉ๋‹ˆ๋‹ค.

      - width: 1/4
        fields:
          coverfour:
            label: ์„ฌ๋„ค์ผ - 4 / 4
            type: files
            layout: cards
            template: image
            info: "{{ file.dimensions }}"
            uploads: false
            max: 1
            image:
              ratio: 5/4
              cover: true
            size: small
            help: ํ•œ ์žฅ๋งŒ ์„ ํƒ๋ฉ๋‹ˆ๋‹ค.

  postpage:
    label: post
    icon: text
    columns:   
      - width: 1/2
        fields:
          maincover:
            label: ํ‘œ์ง€
            type: radio
            options:
              onbtn: ์ด๋ฏธ์ง€ ํ‘œ์ง€
              offbtn: ๋‹จ์ƒ‰ ํ‘œ์ง€
              xbtn: ํ‘œ์ง€์—†์Œ
      - width: 1/2
        fields:
          covers:
            label: ์ด๋ฏธ์ง€ ํ‘œ์ง€
            type: files
            layout: cards
            template: image
            info: "{{ file.dimensions }}"
            uploads: false
            image:
              ratio: 5/4
              cover: true
            size: small
            help: ํ•œ ์žฅ๋งŒ ์„ ํƒ๋ฉ๋‹ˆ๋‹ค.
          color:
            label: ๋‹จ์ƒ‰ ํ‘œ์ง€
            type: color
            editableAlpha: true # (optional) if set to false, alpha value controls are not displayed
            default: "#fff"

      - width: 1/1
        fields: 
          rightpage:
            label: ์šฐ์ธก ๊ณ ์ • ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋“œ
            type: files
            layout: cards
            template: rightimage
            info: "{{ file.dimensions }}"
            uploads: false
            image:
              ratio: 5/4
              cover: true
            size: small
            min: 1
            help: ์˜ค๋ฅธ์ชฝ ์˜์—ญ์— ๋ณด์—ฌ์ง€๋Š” ๊ณ ์ • ์Šฌ๋ผ์ด๋“œ์ž…๋‹ˆ๋‹ค.

      - width: 1/1
        fields:
          mainimageset:
            label: ์ด๋ฏธ์ง€ ์˜์—ญ 1(์•„๋ž˜ ์„ธ ๊ฐ€์ง€ ์œ ํ˜• ์ค‘์— ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•˜์„ธ์š”)
            type: radio
            options:
              onbtn: ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋“œ
              offbtn: ์ด๋ฏธ์ง€ ๋‚ฑ์žฅ
              xbtn: ์ด๋ฏธ์ง€ ์—†์Œ

      - width: 1/2
        fields:         
          mainslide:
            label: ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋“œ 
            type: files
            layout: cards
            template: mainslides
            info: "{{ file.dimensions }}"
            uploads: false
            image:
              ratio: 1/1
              cover: true
            size: small
            help: ์—ฌ๋Ÿฌ ์žฅ์˜ ์ด๋ฏธ์ง€๋ฅผ ์˜ฌ๋ฆด ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

      - width: 1/2
        fields: 
          mainpiece:
            label: ์ด๋ฏธ์ง€ ๋‚ฑ์žฅ
            type: files
            layout: cards
            template: mainpieces
            info: "{{ file.dimensions }}"
            uploads: false
            image:
              ratio: 1/1
              cover: true
            size: small
            max: 1
            help: ํ•œ ์žฅ์˜ ์ด๋ฏธ์ง€๋งŒ ์˜ฌ๋ฆด ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

      - width: 1/1
        fields:
          subimageset:
            label: ์ด๋ฏธ์ง€ ์˜์—ญ 2(์•„๋ž˜ ์„ธ ๊ฐ€์ง€ ์œ ํ˜• ์ค‘์— ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•˜์„ธ์š”)
            type: radio
            options:
              onbtn: ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋“œ
              offbtn: ์ด๋ฏธ์ง€ ๋‚ฑ์žฅ
              xbtn: ์ด๋ฏธ์ง€ ์—†์Œ

      - width: 1/2
        fields:          
          subslide:
            label: ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋“œ 
            type: files
            layout: cards
            template: subslides
            info: "{{ file.dimensions }}"
            uploads: false
            image:
              ratio: 5/4
              cover: true
            size: small
            help: ์—ฌ๋Ÿฌ ์žฅ์˜ ์ด๋ฏธ์ง€๋ฅผ ์˜ฌ๋ฆด ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

      - width: 1/2
        fields: 
          subpiece:
            headline: ์ด๋ฏธ์ง€ ๋‚ฑ์žฅ
            type: files
            layout: cards
            template: subpieces
            info: "{{ file.dimensions }}"
            uploads: false
            image:
              ratio: 5/4
              cover: true
            size: small
            max: 1
            help: ํ•œ ์žฅ์˜ ์ด๋ฏธ์ง€๋งŒ ์˜ฌ๋ฆด ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

      - width: 1/1
        fields:
          thimageset:
            label: ์ด๋ฏธ์ง€ ์˜์—ญ 3(์•„๋ž˜ ์„ธ ๊ฐ€์ง€ ์œ ํ˜• ์ค‘์— ํ•˜๋‚˜๋ฅผ ์„ ํƒํ•˜์„ธ์š”)
            type: radio
            options:
              onbtn: ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋“œ
              offbtn: ์ด๋ฏธ์ง€ ๋‚ฑ์žฅ
              xbtn: ์ด๋ฏธ์ง€ ์—†์Œ

      - width: 1/2
        fields:          
          thslide:
            label: ์ด๋ฏธ์ง€ ์Šฌ๋ผ์ด๋“œ 
            type: files
            layout: cards
            template: thimage
            info: "{{ file.dimensions }}"
            uploads: false
            image:
              ratio: 5/4
              cover: true
            size: small
            help: ์—ฌ๋Ÿฌ ์žฅ์˜ ์ด๋ฏธ์ง€๋ฅผ ์˜ฌ๋ฆด ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

      - width: 1/2
        fields: 
          thpiece:
            headline: ์ด๋ฏธ์ง€ ๋‚ฑ์žฅ
            type: files
            layout: cards
            template: thpiece
            info: "{{ file.dimensions }}"
            uploads: false
            image:
              ratio: 5/4
              cover: true
            size: small
            max: 1
            help: ํ•œ ์žฅ์˜ ์ด๋ฏธ์ง€๋งŒ ์˜ฌ๋ฆด ๋•Œ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.

  filepage:
    label: file
    icon: text
    columns:
      - width: 1/1
        sections:
          allfiles:
            headline: ์ด๋ฏธ์ง€ ์•„์นด์ด๋ธŒ
            type: files
            layout: cards
            # template: image
            info: "{{ file.dimensions }}"
            image:
              ratio: 5/4
              cover: true
            size: small
            help: ์ตœ๋Œ€ 1600px ์ดํ•˜ ํฌ๊ธฐ ์ด๋ฏธ์ง€๋กœ ์—…๋กœ๋“œ ๊ถŒ์žฅ, ํŒŒ์ผ๋ช… ์˜๋ฌธ ์†Œ๋ฌธ์ž, ์–ธ๋”๋ฐ”, ์ˆซ์ž๋งŒ ์‚ฌ์šฉ

And on the webpage(post.php), the slide code below was used the same, and I tried to change the โ€˜templateโ€™ part.

                <div class="swiper-container">
                  <div class="swiper-wrapper">
                    <?php $images = $page->files()->filterBy('template', 'rightimage') ?>
                            <?php if ($images->isNotEmpty()) : ?>
                            <?php foreach($images as $img): ?>
                    <div class="swiper-slide"><img src="<?= $img->url() ?>">
                      <span class="caption"><?= $img->caption() ?></span></div>
                            <?php endforeach ?>
                            <?php endif ?>
                  </div>
                  <!-- Add Pagination -->
                  <div class="swiper-pagination swiper-pagination-white"></div>
                  <!-- Add Arrows -->
                  <div class="swiper-button-next swiper-button-white"></div>
                  <div class="swiper-button-prev swiper-button-white"></div>
                </div>

Lastly, this is the โ€˜modelsโ€™

<?php
class PostPage extends Page
{
    public function cover()
    {
        return $this->content()->get('cover')->toFile() ?? $this->image();
    }

    public function coverone()
    {
        return $this->content()->get('coverone')->toFile() ?? $this->image();
    }

    public function covertwo()
    {
        return $this->content()->get('covertwo')->toFile() ?? $this->image();
    }

    public function coverthree()
    {
        return $this->content()->get('coverthree')->toFile() ?? $this->image();
    }

    public function coverfour()
    {
        return $this->content()->get('coverfour')->toFile() ?? $this->image();
    }

    public function coverpiece()
    {
        return $this->content()->get('coverpiece')->toFile() ?? $this->image();
    }

    public function coverpdf()
    {
        return $this->content()->get('coverpdf')->toFile() ?? $this->image();
    }

    public function mainslides()
    {
        return $this->content()->get('mainslides')->toFile() ?? $this->image();
    }

    public function subslides()
    {
        return $this->content()->get('subslides')->toFile() ?? $this->image();
    }

    public function subpieces()
    {
        return $this->content()->get('subslides')->toFile() ?? $this->image();
    }

    public function rightimage()
    {
        return $this->content()->get('rightimage')->toFile() ?? $this->image();
    }


}

https://sommm.kr/projects
There is no problem with the thumbnail image for the list and the cover image at the top of the article.
Can anyone help me? :frowning:

What I donโ€™t understand is why you donโ€™t use the methods you defined in the models, where you already fetch the images.

The template you want to filter by doesnโ€™t seem to be assigned anywhere.

I would expect a function like this to return a collection of images, but you always just return a single file?