0

I have a website in which I have about 7 images that have been taken by a DSLR camera.

I've tried preloading images although I haven't had success.

I've tried 2 ways of preloading images,

  • the Javascript method
  • and the CSS (set image to -9999) method

but I've had no luck in decreasing lag... Maybe it may just be the fact that I'm new to this or it may be the fact that I try to CSS resize the image to fit 100% on the screen. If anyone can explain the Preloading process on Javascript, that would be beneficial to me too >.< if anyone knows the actual cause of the problem, help me?

Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
Mohammad Al-Ahdal
  • 758
  • 2
  • 8
  • 21
  • what are the images' filesize? – Jason Jul 07 '13 at 00:38
  • Possible [duplicate](http://stackoverflow.com/questions/476679/preloading-images-with-jquery?rq=1)? – leoMestizo Jul 07 '13 at 00:40
  • I agree with @Jason - are you uploading huge files? If so, create lower resolution versions, and only show the full resolution if the user asks for them. If the files are huge, preloading isn't your biggest problem. – Auri Rahimzadeh Jul 07 '13 at 01:30

1 Answers1

1

How about using good old interlaced JPG of a smaller size as a preview, and put the originals behind a link.

Then you can create <img src="..." style="display:hidden"> to preload the originals.

Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277