Open CreateSean opened 3 years ago
so read the docs more and saw transform layouts example has for parameters like this:
{{craft.images.pictureMedia(someAsset, transforms, null, attributes)}}
The third parameter is null and the fourth contains the attributes. Once I updated my code to work with this everything works as expected.
The docs for applying html attributes should include an example with all 4 parameters and also explain what the null parameter is.
@CreateSean Thanks for docs suggestion - will do. And by the way, I will probably migrate all the docs to vuepress soon.
I'm having trouble applying html attributes to the img tag inside the picture element according to the docs https://github.com/craft-snippets/Craft-image-toolbox#applying-html-attributes
What I have that works and adds attributes to the picture tag is:
however if I want to use the method recommended in the docs, to apply attributes to the img tag, I get errors in my template. Code is as follows
Error is: