Wordpress image lazy-loading plugin
Recently I’ve been spending a lot of time on a new Rails project that deals with photos and it also uses a lot of jQuery. I love the jQuery image lazy load plugin and thought since my blog is pretty image-heavy, it’d benefit from it too. It’s trivial to use this plugin, but since my blog tracks Wordpress via Subversion, I wanted to do it as a plugin so I wouldn’t have to touch the Wordpress code. After 15 minutes or so I hacked together a plugin for this.
You can download it at the plugins directory at Wordpress. It’s also available on Github.
It took a day to get commit rights to the Subversion repo of Wordpress, since I use Git and had already pushed to Github, it was a bit of an annoyance to add the empty Subversion repo with git-svn. I won’t go into the steps, but this thread helped a lot. I must say that since it’s a shared Subversion repo, the revision number was 119065 to start with, so git svn fetch took a very long time. I spent almost an hour to get to the point so I could do git svn dcommit. And now every time I do dcommit it takes a while coz it pretty much has to compute the diffs between all the recent commits and apply them to Subversion. After using Git for so long I forgot how painful Subversion was.




testing anti-spam (I have both Akismet and TypePaid AntiSpam enabled).
I noticed the lazy image loading. That shit is tight!
Installed the lazy image loading plug-in on two different WP blogs, but it doesn’t seem to be working… What can I do to troubleshoot it?
Give me the urls and I’ll take a quick look.
The plugin seems to give an error on some layouts on IE8
including your own site!
and it doesn`t work with the K2 theme
@Ramoonus thanks for the note, I’ll check it out, I don’t use IE myself and I don’t even have IE8 in vmware. I’ll check out the K2 theme as well. My guess is that that theme uses jQuery with noConflict(), so the calls are jQuery() instead of $().
I just pushed a fix, it works fine in IE7 for me, well, it always did, the error you got was probably due to using $ with noConflict enabled.
Two sites, both on version 0.5:
http://oostdyk.com/randy/blog/
It appears to be working, in that the images show up as you scroll, but it doesn’t appear to delay the downloading of the images, which is more important on the next site:
http://photosparks.com/blog/
Here, I can see in the source that the jquery and lazyload js are there, they just don’t seem to be doing anything.
Sorry I didn’t include them in the initial comment above!
okay, oops, disregard! It’s working!!! =)
Thanks for the work you’ve done in creating the plug-in, and sharing it!