Could someone explain me how should I add alt tag to images, if I use such approach (below) to get images:
<?= $page->images()->find($page->headerImage())?>
The empty alt tag is visible in rendered HTML code (for example in developer tool in Chrome browser), but I don’t know how to add alternative text, so it could be shown in rendered HTML.
Thanks!
Whether or not you should add information in the alt attribute depends on the function of the image, though. The alt attribute should be empty for images that just have a decorative function and should be ignored by assistive technology.
If I remember correctly, the thumbnail method has the possibility to add html attributes to the options array as well and it uses the html()-method.
So this should work as well: