Currently, the image's alt attribute displays the article title, even though the image has its own alt attribute.
The problem is a redeclaration of $layoutAttr. From lines 74 to 84, the attributes are constructed correctly, but on line 95, a simple redeclaration is made without considering that it already exists.
The $layoutAttr on line 95 would make sense if if($introImge) only checked for the intro image from Helix, but $introImage retrieves the image from Helix or the Joomla core lines earlier. Furthermore, on line 60, execution stops if the intro image doesn't exist in Helix or the Joomla core. Therefore, if($introImge) is unnecessary, and all the code from line 106 onward is also unnecessary because the ELSE condition won't be met.
I've included my temporary solution at the end. Because if $introImge can get the value of the intro from Helix or the Joomla core, the output needs improvement, such as removing the div from the <a> tag, among other things. Or, if $introImage is only going to check the Helix image as in the past, then all the code also needs to be cleaned up.
Regards
Replace lines from 95 to 99 with:
echo LayoutHelper::render('joomla.html.image', $layoutAttr);