I want to give editor ability to set background image for each layout. In blocks layout settings I have field:
bgimage: type: files
And in template I have:
<?php if($image = $layout->bgimage()->toFile()): ?> <?= $image->url() ?> <?php endif ?>
But it prints url like this:
https: mywebsite.com media pages home 2fa432d22c-1637583129 imagetitle.jpg
Also tried other ways.