To optimize page load it is necessary to reduce load of big-medium images in content. Best idea is to load medium images, which now are loaded together with image pager thumbnails, OnClick or OnMouseOver as an option in configuration! When clicking big-medium images it opens large image in colorbox or thickbox as it does now.

CommentFileSizeAuthor
#2 lazy-loading-1713440-2.patch1.97 KBmaximpodorov
#1 drig_2.zip22.5 KBJarviss

Comments

Jarviss’s picture

Issue summary: View changes

correction

Jarviss’s picture

Issue summary: View changes

correction

Jarviss’s picture

Title: Ajax load medium images on image pager onmousover event? » Ajax load medium images on image pager onClick event?
StatusFileSize
new22.5 KB

You may take Ajax image load code onClick image pager from this module (it works with Drupal 7.14)

maximpodorov’s picture

Status: Active » Needs review
StatusFileSize
new1.97 KB

A naive implementation of lazy image loading.

manuel garcia’s picture

Status: Needs review » Needs work

Thanks for the patch @maximpodorov !

However you cant do this just with jQuery, I've setup a testing site with the patch applied here so we can see it:
http://sed6534c617655b7.s3.simplytest.me/node/1
If you check the Net tab on firebug and refresh, you'll see all images are still being downloaded on page load.

For this to happen we have to alter how the images are printed:

  1. print them with a src of a loader gif, and add the img url to the data-src attribute
  2. process them using jQuery in the same style as you did
manuel garcia’s picture

Further more, I think this should be optional, for it will render the gallery without JS enabled not functional...

maximpodorov’s picture

My patch does exactly this. It changes src attribute of larger images to inline data image (white 1x1 image).

manuel garcia’s picture

I think we should probably look into integrating with https://drupal.org/project/jail

manuel garcia’s picture

Issue summary: View changes

edit

astonvictor’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

I'm closing it because the issue was created a long time ago without any further steps.

if you still need it then raise a new one.
thanks