Skip to main content
Topic: [ADDON] Images Lazy Loading (Read 1265 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[ADDON] Images Lazy Loading

Images Lazy Loading v0.0.2
Introduction
Yet another simple addon: it makes all the images "lazy load"[1].
In order to do the lazy loading, the Lazy Load Plugin for jQuery is used.


License
o This ElkArte Addon is subject to the terms of the BSD "3-clause" license. You can obtain a copy of the License at http://opensource.org/licenses/BSD-3-Clause

Repository / Download
First result I found searching for lazy load :P
Bugs creator.
Features destroyer.
Template killer.

Re: Images Lazy Loading

Reply #1
It would be nice if you included Beta versions in the required version range - makes the testing easier. I had to modify it myself.

In package-info.xml the name and destination of the JavaScript file is incorrect. So it doesn't install unless you fix those.

Also I'm not sure if lazy loading all the images on the page is a good idea. Maybe you should just limit it to images in posts, signatures and avatars.

Re: Images Lazy Loading

Reply #2
Oook. I should not change my mind so often... :-\
Should be fixed now. Thanks! (And sorry for the troubles. :-[)

Yup, the first idea was avatars and attachments, then I wend for "everything" just because it was easier. lol
At the moment is more a childish game, rather than something really useful. :P

I'll play some more in the next days. ;D
Bugs creator.
Features destroyer.
Template killer.

Re: Images Lazy Loading

Reply #3
You don't seem to have THEMEDIR, so use $themedir. You can also just set the range as 1.0 beta 2 - 1.0.99; compareVersions() can handle that. (guess who coded it! :P)

For avatars, posts and signatures, you can just look for classes "avatar" and "bbc_image". Attachments don't seem to have a class attached to them but you could probably use the ";image" bit to catch them. (it would have been nice if they had a class though)

Re: Images Lazy Loading

Reply #4
I thought we changed for all-caps the theme dir as well.... meh.

 emanuele opens a ranting topic.
Bugs creator.
Features destroyer.
Template killer.

Re: [ADDON] Images Lazy Loading

Reply #5
I don't know why, but this brought my forum to a crawl.  Uninstalled it and everything is snappy again.

Re: [ADDON] Images Lazy Loading

Reply #6
"Nice" to know.
It may be related to the buffer-rewriting it does in order to replace the images... I have to check it out more.
Bugs creator.
Features destroyer.
Template killer.