I need to make some adjustments to
/layouts/joomla/content/full_image.php
in Joomla 4.1.5.
For all (full) article images without an alt attribute the alt attribute should be the title of the article.
That works fine with adding the line
$item = $displayData;
and replacing
'alt' => empty($images->image_fulltext_alt) && empty($images->image_fulltext_alt_empty) ? false : $images->image_fulltext_alt,
with
'alt' => $item->title,
Anyway, my challenge now is to only set the article title as an alt attribute in case I did not define an alt attribute in the article settings. I tried but I failed so far. But this should be an easy one, right?