I tried to accomplish this with a userscript.js.
Lazy Load Plugin for jQuery can be found
here.
All "img" tags have to be altered. Address of the image must be put into "data-original" attribute. So I tried the following:
Put jquery.lazyload.js and userscript.js to /conf.
userscript.js looks like this:
/* DOKUWIKI:include jquery.lazyload.js */
jQuery("img.media").each(function() {
$(this).attr("data-original",$(this).attr("src"));
$(this).attr('src', 'http://placehold.it/350x150');
$(this).attr.lazyload();
});
Don't mind the placehold.it link, this is just for testing. Here is a working jsbin:
http://jsbin.com/puyarenubi/1/watch?html,css,js,output
Seems like this is not executed by DokuWiki at all. I verified this with Firefox' Web Inspector. Putting this to /lib/tpl/mytheme/script.js won't work, too. File rights are 777. So I wonder what could be wrong here?
Also: the image links must be changed before the whole page is loaded, is this even possible with userscript.js?
Thanks in advance!