tuupola / lazyload

Vanilla JavaScript plugin for lazyloading images
https://appelsiini.net/projects/lazyload/
MIT License
8.76k stars 2.23k forks source link

Long images not loading on iOS #210

Open christinanguyen opened 10 years ago

christinanguyen commented 10 years ago

It seems like images that are taller in size (maybe taller than 3500px but that's a guess) do not get loaded in iOS Safari and Chrome. I'm not sure of Android and others.

Here's a link http://christinanguyen.net. Please click on the projects titled "CareersAtHCA," "Chloe's Desserts," "Pier 2934," and/or "HealthComm" for some examples. You'll see that some images load and the ones that are longer won't.

Here's a screenshot of how it looks when it doesn't load in.

2014-08-11 13 33 35

m-spyratos commented 10 years ago

Have you tried loading the image without the plugin? Does it show up?

heyman commented 10 years ago

I believe I've run into the same issue. The images on the following website doesn't load in iOS8 (only tested with an iPhone 6 so far), though the images do load in iOS6 on my iPhone4S:

http://boutiquehotels-berlin.com/hotel/276932/photos/

I'm going to do some more digging later tonight, when I've gotten a hold of an iOS > 6 device.

heyman commented 10 years ago

Unfortunately, I'm not able to reproduce this issue on an iPad 2 with iOS 8.1 installed. I can also report that the images on your website @christinanguyen are loading fine on the iPad as well.

I'll not be able to investigate this any more until tomorrow when I can get a hold of an iPhone 6.

jamblo commented 9 years ago

I have this issue too... both Safari and iOS. Urgently need a fix please!

Rycochet commented 9 years ago

It's an issue with how it detects if an image is in view - it only checks if the top or the bottom is within the viewport - but doesn't account for images where the image is longer, so the top is above and the bottom is below - no doubt at least one of the forks has fixed this obvious oversight ;-)

tuupola commented 9 years ago

Will fix soonish :)