I am trying to get the URL of the first image on a page.
$article->images()->first()
this will display the image just fine, but when I add
$article->images()->first()->url()
it causes it to be an error.
Yet further down in the template,
<a href="<?= $article->url() ?>" class="article-more">read more</a>
this url() works fine
The reason I want the img url is because I want to be able to add the align=“left” property to the img tag, i.e.
<img src="<?= $article->images()->first()->url()?>" align="left" />