Hi,
I cant figure out why the full path of the image URL is not showing on the frontend of the website. Below is the PHP snippet:
<?php foreach ($page->children()->listed() as $work): ?>
<li>
<a href="<?= $work->url() ?>">
<figure>
<img src="<?= $work->cover()->url() ?>">
<figcaption class="project-name">
<?= $work->title() ?>
</figcaption>
</figure>
</a>
</li>
<?php endforeach ?>
Yet on the frontend the img tag is:
<img src="- image-1.png">
YAML:
- width: 1/3
sections:
images:
type: fields
fields:
cover:
label: Main Image
type: files
template: image-template
Please can somebody point me in the right direction? Thank you