For your first issue, I suspect one of your articles does not have a CoverImage set. You need to check the image exists before trying to use it. Something like this in you loop…
<?php
<?php foreach($page->children()->visible()->paginate(8) as $article): ?>
// let's assume the filename is stored in a field called coverImage
$image = $article->image($coverImage());
// always check if the image exists!
if($image):
?>
<img src="<?= $image->url() ?>" alt="">
<?php endif ?>
<?php endforeach ?>
Thank both of you, the coverImage is working and first tag too but there is a another problem with it.
The related articles snippet filter by the first tag show only 2 or 3 articles whereas I have 10 articles with the tag. I’ve try to figure out why all the this afternoom but I don’t find why.
Well, you limit your collection to 9 articles first, then filter. That means that while there are probably more articles, they won’t be fetched if they are not within the first 9. You probably want to filter. first, then limit, if you want to limit at all.