Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lazy load not working #441

Open
MurhafSousli opened this issue Oct 28, 2017 · 0 comments
Open

lazy load not working #441

MurhafSousli opened this issue Oct 28, 2017 · 0 comments

Comments

@MurhafSousli
Copy link

Hi, I am trying to integrate lazysizes in an angular gallery plugin

I am getting this weird behavior when I test it on Chrome in slow 3G mode

https://www.useloom.com/share/a20dde6dde9b4bf297f5f1d82c021270

https://www.useloom.com/share/c8ec943369414eda9f4df49c8f0f968a

Angular code

  <img
       class="lazyload"
       data-sizes="auto"
       [src]="item.thumbnail"
       [attr.data-src]="item.src"
       [alt]="item.text"
       (lazyloaded)="onLazyLoaded($event)">
import 'lazysizes/plugins/unveilhooks/ls.unveilhooks';
import 'lazysizes/plugins/respimg/ls.respimg';
import 'lazysizes/plugins/optimumx/ls.optimumx';
import 'lazysizes/plugins/attrchange/ls.attrchange';
import 'lazysizes/plugins/progressive/ls.progressive';

import lazySizes from 'lazysizes';

export class GalleryItemsComponent implements OnInit {

  ngOnInit() {
    lazySizes.init();
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant