Closed artmem closed 1 year ago
@artmem
Althought some time has passed, this functionality is now included :)
You can now pass anonymous function to attributes
array property in layouts settings. This function can have $assets
variable which will contain assets used in this layout.
More info:
https://craftsnippets.com/docs/image-toolbox/Placeholders.html
I'm using transform layouts, and want to set alt text for my images using using my image.alt tag or image.title, but there doesn't seem to be a way to do it with transform layouts. I can't put the variables in the settings, so I tried
and it outputs the image as expected, but just ignores the attributes. Is there a way to accomplish this?