Hi,
The following code shows the image:
<?= $podcast_post->image() ?>
If i want to crop the image with:
<?= $podcast_post->image()->crop(300) ?>
I have got the error: “Call to a member function crop() on null”. Yes, i have not in every folder an image and i guessed to check with an if-statement this situation with:
<?php if($podcast_post->image()->isNotEmpty()): ?>
<?= $podcast_post->image()->crop(300) ?>
<?php endif ?>
But then, i have got the next error: “Call to a member function isNotEmpty() on null”.
How can i eat the tomatoes on my eyes?
BR