Show specific image from page

hi, i use the plugin “kirby-plugin-image-crop-field”. I have several images on the site that are cropped. Currently I have a loop that outputs all images at once.

<?php

$items = $page->images();
foreach ($items->search('cropped') as $cropped) {
  var_dump($cropped);
};
?>

However, I would like to determine exactly which cropped image is displayed, e.g. only the third image or the fourth, etc.

Any ideas? Thank you!

Link to var_dump: var_dump

After i Upload a new Image the Sort of the Array changed, and i can’t use the follow snippet: <?= $page->files()->nth(3)->filename() ?>

You could add another files field into your blueprint and limit it via max: 1 and multiple: false.

Or if you know the filename and it’s always gonna be the same you could use $files->findByID().

You can use nth()

if ( $image = $page->images()->nth(1) ) {
  echo $image;
}

There’s also first() for the first one, last() for the last one.