getkirby / starterkit

Kirby's sample site – the easiest way to get started with Kirby
https://getkirby.com
176 stars 51 forks source link

Image Block Alt text not defaulting to image alt #41

Closed squareclouds closed 2 years ago

squareclouds commented 2 years ago

hi everyone!

i hope i am posting this in the right place. i just realized, that the image block does not switch to the default alt-text you might have for the image. so technically on line 29

$alt = $alt ?? $image->alt();

the statement is delivering always true, the double question mark is not realizing the $alt variable is not set. the result is, that if you didnt input an alt-text in the block settings and want to default to the image alt ("file alt-text") the img-tag remains empty.