aFarkas / lazysizes

High performance and SEO friendly lazy loader for images (responsive and normal), iframes and more, that detects any visibility changes triggered through user interaction, CSS or JavaScript without configuration.
MIT License
17.55k stars 1.73k forks source link

Dynamically Rendered Images Not Loading #307

Open neilchaudhuri opened 8 years ago

neilchaudhuri commented 8 years ago

I have a UI with tabs where the content of the tabs is loaded dynamically via an Ajax call where JSON is received, a Dust template renders the content, and it is appended to the DOM. I have found that the images in all tabs but the first do not fetch images. The low-res "gray box" placeholder remains. In the first tab, the working images have a class called lazyloaded. However, all the gray images have a class called lazyloading. Sometimes, if I click around the tabs, things work. I've tried explicitly calling the init function, but I get an error that "lazyload is not a function."

Any ideas would be appreciated. The plugin works great with static content.

aFarkas commented 8 years ago

Can you please show me a testcase or mail me a link to the site?

neilchaudhuri commented 8 years ago

At the moment, this seems like an issue on Chrome only. I'm seeing the image requests "pending" in the console.

You will need a password to see the site, so let me see if I can get permission for you.

Thanks.

neilchaudhuri commented 7 years ago

I sent you an E-mail with a link to the site. Look forward to your feedback.

Thanks.