-
Notifications
You must be signed in to change notification settings - Fork 2k
Make lazyload working again #957
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
Conversation
Good idea. Currently, lazyload relies on jQuery and has some issues - one image makes two network requests |
I didn't use these two lazyload plugins before. What are the differences in functionality and performance between them? Seems lazysizes has more stars / forks. |
lazysizes is a full-featured lazy loading library that lazy loads images and iframes. The pattern it uses is quite similar to the code examples shown here in that it automatically binds to a lazyload class on lozad.js is a super lightweight option that uses intersection observer only. As such, it's highly performant, but will need to be polyfilled before you can use it on older browsers. --- from google web developers |
I see. I also support using the lightweight one - lozad.js |
Need add a options to load polyfill for ie user.
|
No need to add an option to load polyfill for ie user. NexT v7 already dropped ie support. |
See also hexojs/hexo-renderer-marked#156 |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue resolved: N/A
Images inside
.content
element already havesrc
attribute. Browsers will load them by default, solazyload: true
takes no effect.What is the new behavior?
How to use?
In NexT
_config.yml
:Does this PR introduce a breaking change?