I just installed the focus plugin (GitHub - flokosiol/kirby-focus: Better image cropping for Kirby CMS) 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!