axe312ger / metalsmith-adaptive-images

DEPRECATED: A plugin for Metalsmith to create adaptive images via srcset and styles properties
9 stars 1 forks source link

Support for lazy load #40

Open jvolker opened 6 years ago

jvolker commented 6 years ago

Being able to use this with LazyLoad would be nice.

LazyLoad requires the attribute names to be changed from src and srcset to data-srcand data-srcset as shown in this example.

Two suggestions

axe312ger commented 6 years ago

I'd even go so far that you can pass your own function to generate the <img /> tags while this https://github.com/axe312ger/metalsmith-adaptive-images/blob/master/src/index.js#L128-L136 is the default function to handle it.

Create a PR, I am happy to merge it then :)