Solution: Making BJ Lazy Load More Awesome and Work with Srcset
-
Since it’s near impossible to find a Lazy Load plugin that works with themes or frameworks like Cherry while also working with the provided srcset.
BJ Lazy Load is almost all-around perfect, you just need to change something in the bj-lazy-load.js and bj-lazy-load.min.js files
Find this:
( null != el.getAttribute(‘data-srcset’) ) {
el.setAttribute( ‘srcset’, el.getAttribute(‘data-srcset’) );
}and edit it to make it like this:
( null != el.getAttribute(‘data-lazy-srcset’) ) {
el.setAttribute( ‘srcset’, el.getAttribute(‘data-lazy-srcset’) );
}This edit makes this Lazy Load plugin work so much better with newer versions of WordPress.
Ryan
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Solution: Making BJ Lazy Load More Awesome and Work with Srcset’ is closed to new replies.