My “related pages”-plugin teasers a bunch of other pages. I want to show in this list
- the page title
- The first image from that page
In case the page does not contain an image i want to display a fallback image.
My image renderer receives image-objects (it resizes the image)
My default image is located here: assets/images/default.png
I can access my image this way:
$image = $kirby->url('assets') . '/images/default.png';
But as soon as i use $image in my image-renderer, it breaks (because $image contains only a string and not a whole image object).
How can i use the image-url to create/ call the whole image object?