# How to set focus plugin on automatic thumbnails

**URL:** <https://forum.getkirby.com/t/how-to-set-focus-plugin-on-automatic-thumbnails/28781>\
**Category:** Questions\
**Tags:** v3\
**Created:** [June 9, 2023, 12:01pm UTC](https://forum.getkirby.com/t/how-to-set-focus-plugin-on-automatic-thumbnails/28781 "2023-06-09T12:01:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fynn5808](https://avatars.discourse-cdn.com/v4/letter/f/a5b964/32.png) [@fynn5808](https://forum.getkirby.com/u/fynn5808)\
**Post date:** [June 9, 2023, 12:01pm UTC](https://forum.getkirby.com/t/how-to-set-focus-plugin-on-automatic-thumbnails/28781/1 "2023-06-09T12:01:43Z")

</div>

I just installed the focus plugin ([GitHub - flokosiol/kirby-focus: Better image cropping for Kirby CMS](https://github.com/flokosiol/kirby-focus)) to set a focus point on my thumbnail images.  
On my home page all projects are called with an automatically generated thumbnail. The projects are in the content/home folder and I’ve already set the focal points for each image in the panel but don’t know how or where to include the plugin in the code to make it work.

This is the home.php where \<?= $project-\>image() ?\> calls the projects with images:

…

```
    <nav class="filter">
      <a href="<?= $page->url() ?>">All</a>
      <?php foreach ($filters as $filter): ?>
      <a href="<?= $page->url() ?>?filter=<?= $filter ?>"><?= $filter ?></a>
      <?php endforeach ?>
    </nav>
    
    <ul class="work"> 
        <?php foreach ($page->children()->listed() as $project): ?>
            <li>
                <a href="<?= $project->url() ?>">
                    <figure>

                    <?= $project->image() ?>

                      <figcaption>
                        <?= $project->title() ?>
                        <?= $project->category() ?>
                      </figcaption>
                  </figure>
                </a>
            </li>
        <?php endforeach ?>
    </ul>

```

…

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [June 9, 2023, 12:04pm UTC](https://forum.getkirby.com/t/how-to-set-focus-plugin-on-automatic-thumbnails/28781/2 "2023-06-09T12:04:26Z")

</div>

> [@fynn5808](#):
>
> ` <?= $project->image() ?>`

Instead of the above

```auto
 <?= $project->image()->focusCrop(300, 200) ?>

```

Not without making sure the image exists, first, of course.

---

<div class="post-metadata">

**Author:** ![fynn5808](https://avatars.discourse-cdn.com/v4/letter/f/a5b964/32.png) [@fynn5808](https://forum.getkirby.com/u/fynn5808)\
**Post date:** [June 9, 2023, 12:45pm UTC](https://forum.getkirby.com/t/how-to-set-focus-plugin-on-automatic-thumbnails/28781/3 "2023-06-09T12:45:05Z")

</div>

Great, thanks!
