-
Notifications
You must be signed in to change notification settings - Fork 44
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
WordPress plugin. #33
Comments
Let me begin by thanking you for providing your WP Plugin! ;-) And I especially do like your approach of both how you handle the (first) image attribute to
|
I do not understand what you mean by that. The issue is still open it seems to be waiting for some special thing for frameworks. In your demo https://output.jsbin.com/codelib/1 its loaded with async I do not see how React and other frameworks relate to WordPress, React is used on the backend inside Gutenberg but most themes do not used any JS frameworks on the frontend so it seems fine just how it is. |
I'm sorry, my comments might have been misleading on some aspects:
|
Ah OK thanks for the clarification. |
@nextgenthemes, to my understanding, this issue was mainly about having this conversation and even also aligning those topics - or is there anything else that you want to do with this ticket? Elsewhere I could close it, as we seem to have aligned on everything. |
Thanks @mfranzke for linking to my WP Plugin. I actaully wanted to tell you but forgot about it and then found it already in the readme.
As always I spend way more time on this then expected. The latest versions do not wrap any element that is already wrapped in
noscript
and also I made a change that I do not wrap the the very first element inside thethe_content
and putloading=eager
on it. This polyfill does nothing witheager
right? And wrapping it would be counterproductive as that needs the JS to execute first b4 the image would be loaded right?If you or anyone reading this has any suggestions for the plugin please let me know.
I recently after I first released my plugin found this https://wordpress.org/plugins/native-lazyload/ by google. It got a lot of negative feedback. I skimmed the code and they do include a script but let it load with
defer
and make it only execute once. I like this more as you can async load it in the head, makes way more sense to me. As for the PHP code its seems quite complex, possibly bloated. Mine takes only ~150 lines so far. There are special hoops they have to jump because their script is not working on later loaded images.The text was updated successfully, but these errors were encountered: