And helps keep the payload of the site down by not needing additional JS, CSS, etc
I just write-out srcset in template and use picturefill, since I dislike to configure image-size in yml (heyday/silverstripe-responsive-images) probable so DRY. Anybody just using includes for that?
Yeah YAML isn’t ideal for that 😕 but I’ve found it much cleaner than putting all the logic in templates
Especially if there are a large number of sizes needed
Curious to see how includes would work?
<% with $Image %> <% include ImageSet %> <% end_with %> ?
I see, that would mean a lot of includes for some of the projects I’ve worked on 😛
I guess it's swings and roundabouts. You have an include per set variation rather than a YML block
I've tended to do it manually in my templates in the past. How does the responsive images addon deal with the alt tags?
I've not checked it out, but thought
<% include ImageSet Image=$Image, width=100 %>