In the snippet for the image block (snippets/image.php) I can see the following code which “pulls” data from any given attribute of the block:
<img src="<?= $src ?>" alt="<?= $attrs->alt() ?>">
The user can easily set attributes like the alt text, classes etc. via the block settings. So far, so good.
But I’d like to reference the alt text image metadata from a sidecar (.txt) file, based on a file template. How would I go about referencing this in the image snippet?
I see that the image id and guid is present in the block attribute data, can I go from there?