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

Utilize HTML loading="lazy" attribute instead of current lazy loading implementation #443

Open
thomasdn opened this issue Sep 29, 2023 · 0 comments

Comments

@thomasdn
Copy link

Galleria seems to implement its own JS version of lazy loading images.

For projects that utilize Galleria to show thumbnails, this crashes Safari pages on iOS devices ( see saimn/sigal#497)

I believe the custom JS implementation of lazy loading could be omitted entirely and replaced by built in HTML features for lazy loading, namely:

<img src="image.jpg" alt="foo" loading="lazy" />

I suppose this HTML5 feature was not available when Galleria implemented the JS lazy loading. Now that it is available, it would probably be better to use standard functionality. It would likely also perform better - although, I have not been able to test this.

Would it be feasible to make this change?

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