Images appearing as links

Hi there,

I’m trying to create a slider and grab every picture from an album to work as a slide.
I’m just wondering why when using the code below, all the images appear as links instead of images:

  <!-- Slides -->
                  <div class="swiper-slide">   <?php
                    // the `cover()` method defined in the `album.php` page model can be used
                    // everywhere across the site for this type of page
                    if ($slide = $album->images()): ?>
                      <?= $slide ?>
                    <?php endif ?>
                  </div>

I’m sure I’m missing something.
Thanks in advance for the ghelp.

You would have to loop through the images instead of trying to echo an image collection. $album->images() is a collection of images, not a single image. If you echo it, all you get is a list of image paths.

<?php foreach ($album->images()) {
  echo $image;
}
?>

I don’t know