If I don't specify alt within attributes, then output has no alt tag, looking into responsiveImageWithPlaceholder.blade.php, there is also no alt attribute. Isn't name column here to be used as alt?
$media = $this->getFirstMedia('image');
return $media
->img()
->attributes([
'class' => 'w-full h-full object-cover object-center',
'alt' => $media->name, // without this no alt in the output
])
->toHtml();
If I don't specify
alt
within attributes, then output has noalt
tag, looking intoresponsiveImageWithPlaceholder.blade.php
, there is also noalt
attribute. Isn'tname
column here to be used asalt
?$media = $this->getFirstMedia('image');