0

Website has about 40-50 images to load on each page, i am looking for modern cross-browser (ajax?) script that loading images on website only at visual browser area without mass 'anything' pre-loading by default... Could any one give a good advice?

Ken Tang
  • 499
  • 2
  • 7
  • 20
  • my advise - don't load 40-50 images, add more pages. –  Sep 17 '12 at 06:50
  • or on upload make thumbnails of these pictures, try using http://www.white-hat-web-design.co.uk/blog/resizing-images-with-php/ – ka_lin Sep 17 '12 at 06:55
  • @KA_lin is he looking for this? – Jigar Pandya Sep 17 '12 at 06:57
  • Possible Duplicate: http://stackoverflow.com/questions/5117421/how-to-load-images-dynamically-or-lazily-when-users-scrolls-it-into-view – jimp Sep 17 '12 at 06:58
  • @Jigar Pandya he is looking for a fast way to load the page, as he didn`t provide additional information I thought it might help, if he is using these images as a gallery on click he can make an ajax for the big image for instance...if he has a stack of 50 images...then he doesn`t obviously – ka_lin Sep 17 '12 at 07:02
  • Did the following worked for you? anyways @ka_lin thanks for the clarification over here I was little confuse about the question so.. – Jigar Pandya Sep 18 '12 at 05:18

2 Answers2

1

Hello You can try on Lazy Load of images in PHP.. You can do this using jQuery package..

See my own answer here how to apply the load on demand (Lazy loading) concept in datalist for Images using asp.net? and find how you can do this and load only one image at the time of page load and load other images when user scrooll down..

The above answer should work for you perfectly in PHP as well...

http://www.appelsiini.net/projects/lazyload

Lazy Load is a jQuery plugin written in JavaScript. It delays loading of images in long web pages. Images outside of viewport (visible part of web page) wont be loaded before user scrolls to them. This is opposite of image preloading.

Using Lazy Load on long web pages containing many large images makes the page load faster. Browser will be in ready state after loading visible images. In some cases it can also help to reduce server load. (Above is taken from the site)

Community
  • 1
  • 1
Jigar Pandya
  • 5,822
  • 1
  • 22
  • 43
0

Try the Lazy Load Plugin for jQuery. I think it does what you are describing.

jimp
  • 15,885
  • 3
  • 23
  • 35