If you would like to enable Lazy Load on Genesis, you may notice that the feature images do not lazy load. Because of the simplicity of Lazy Load, it is quite easy to add this functionality.
Add the following to your functions.php file. And BOOM! you're done!
The later function, wps_lazyload_placeholder_image, will enable you to setup a default image instead of the Lazy Load's default placeholder image, which is 1x1.trans.gif. However, if you are good with the 1x1 gif, then you don't need the second function.
Grumpyfoot says
Hi Travis Smith,
You’re a lifesaver. I think it worked my site. I tried refreshing a couple of times to make sure. I just need to add a lot more content to be certain. But thank you thank you thank you.
note to readers: Doesn’t work with BJ Lazy Load.
King says
How do I manually add the lazyload functionality to genesis without making use of the plugin..? is there any way I could add the same through code?
Oscar @ Blogging Tips says
Thanks for this article Smith.
The code displays well when I try to view my Source, but it just doesn’t load the images, only the default LAzy Load image displays. What might be the cause?
Thanks and anticipating your reply.
Oscar @ Blogging Tips says
I had to reload my page twice with a hard Ctrl + R reload and it’s working perfectly. Thanks for the saver article Smith ;).
Michelle says
Hi Travis,
return ‘http://url/to/image’; <– need to change to real featured image ?
Thanks
Matt Morisette says
Can you put the code back up?
Thanks
Matt