I’m trying to set a cover image for a project and I can’t get the image to display properly, just the image name is coming up.
my code is:
<div class="container">
<ul class="love-stories">
<?php foreach ($page->children()->listed() as $project): ?>
<li>
<a href="<?= $project->url() ?>">
<figure class="effect-sadie">
<?php if ($cover = $project->cover()): ?>
<?= $cover->crop(1020, 740) ?>
<?php end if ?>
<figcaption>
<h2><?= $project->title() ?></h2>
<p><?= $project->location() ?></p>
</figcaption>
</div>
</a>
</li>
<?php endforeach ?>
</ul>
</div>
and my blueprint is:
title: Wedding
columns:
left:
width: 1/2
sections:
content:
type: fields
fields:
location:
type: text
intro:
type: textarea
cover:
type: files
multiple: false
layout: cards
cover: true
size: large
right:
width: 1/2
sections:
gallery:
type: files
layout: cards
limit: 999
image:
ratio: 4/3