Displays wrong images in foreach

Hey,

i created a collection of tools. Its a pretty big page. I dont know why, but it happens almost on every pageload that wrong images are shown… Is this a kirby related problem?

  1. Wrong image
  2. Correct image in source code…

My foreach looks like this:

 <?php foreach (page()->children() as $subpage) : ?>
                <a href="<?= $subpage->url() ?>">
                    <div class="card">
                        <!-- <div class="resources__card__thumbnail"> -->
                        <div class="card__thumbnail" style="background-color:<?= $subpage->color() ?>">
                            <?php if ($image = $subpage->logo()->toFile()) : ?>
                            <img class="card__thumbnail__logo " src="<?= $image->url() ?>"
                                alt="<?= $image->alt() ?>" title="<?= $image->title() ?>">
                            <?php endif ?>
                        </div>
                        <div class="card__texts">
                            <div class="card__texts__top">
                                <span class="card__texts__top--emoji hideon__tablet"><?= $subpage->emoji() ?></span>
                                <div>
                                    <h2 class="card__texts__top--name"><?= $subpage->name() ?></h2>
                                    <h3 class="card__texts__top--views custom-subheadline" style="font-size: 13px; margin-top:0px"><?= $subpage->introtext() ?></h3>
                                </div>
                            </div>
                            <!-- <p class="card__texts--introtext"><?= $subpage->introtext() ?></p> -->
                        </div>
                    </div>
                </a>
                <?php endforeach ?>

Maybe it’s a cache problem?
I just visited the page for the first time and the logos seem to show correctly.

Its not always the same. Sometimes another picture has the problem…

I can’t reproduce the issue on the life site.