lazysizes icon indicating copy to clipboard operation
lazysizes copied to clipboard

Images not loading sometimes

Open programad opened this issue 3 years ago • 6 comments

Hi, @aFarkas . Firstly I want to thank you for this awesome tool that me and so many people love all over the world.

I have an issue that sounds similar to #311 which is: sometimes, the lazyloading just don't work but if I keep devtools open, it works every time just fine.

I read through the issue mentioned above, tried some presented solutions but they did not work. Maybe my issue is sligtly different.

My website is located at https://www.ludustack.com and all the images on all screens you click are lazyloaded by lazysizes. Some images just use a placeholder local image as src (like the users list) and some images use both data-src and data-dataset, like the home screen and the game list.

My codebase is open source and I just load the lazysizes.min.js script in the file _/LuduStack.Web/Views/Shared/Layout.cshtml on line 935. That's it.

Would you kindly help me to identify what is the issue here and possibly help me to solve this?

programad avatar Apr 28 '21 12:04 programad

Have you already fixed it? I'm currently browsing around but can't find any image that is not loading.

aFarkas avatar May 01 '21 07:05 aFarkas

Have you already fixed it? I'm currently browsing around but can't find any image that is not loading.

Hi, thank you for taking a look. No, I haven't fixed it yet. Sometimes it only happens after refreshing the page several times (max 1 minute pressing F5). Since I am constantly working on this project, I have to refresh the page a lot and sometimes get this issue. In the production environment, had this bug occasionally.

programad avatar May 01 '21 13:05 programad

I'm experiencing what may be the same issue. We're getting 404s on our images about about 10% of the time -- they show {width} still in the filename

arringtonm avatar May 20 '21 17:05 arringtonm

@arringtonm without a working test case it is impossible to know. For me it sounds that the {width} transforming plugin is executed after core. So do you combine both script using a script bundler. If not. In which order are they loaded, do you use async and/or defer....

aFarkas avatar May 20 '21 19:05 aFarkas

Thanks for the quick reply! Looks like RIAS was loading on the line after lazysizes. I have swapped it and so far haven't encountered the 404s 🙏

arringtonm avatar May 20 '21 20:05 arringtonm

@aFarkas I have a similar issue and think I can tell you how to reproduce it.

  1. Go to this website: https://dasneuekispi.ch/
  2. Scroll down a bit to the two teasers and click on the button "Diegos Geschichte" to go to the subpage
  3. Use the back-button of the browser (I use Google Chrome 93 on Macbook Pro with Big Sur)
  4. The background images of the two teasers are missing

Is this a bug or am i doing something wrong that causes the issue?

Kreativschnittstelle avatar Oct 29 '21 14:10 Kreativschnittstelle