You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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();
This discussion was converted from issue #3535 on February 14, 2024 13:00.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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');
Beta Was this translation helpful? Give feedback.
All reactions