Community Forums › Forums › Archived Forums › General Discussion › Lazy load Genesis 3.2.0
- This topic has 10 replies, 3 voices, and was last updated 6 years, 4 months ago by
Fabio Nodari.
-
AuthorPosts
-
November 13, 2019 at 9:24 pm #494676
Fabio Nodari
ParticipantHi guys, I see that the latest version of Genesis has this feature:
Feature: Lazy load images in Chrome 76+ (off by default, enabled with genesis-lazy-load-images theme support).How can I enable it?
I added this line to the function file but the images are not lazyloaded:add_theme_support( 'genesis-lazy-load-images' );
Thanks
November 14, 2019 at 4:09 am #494682AnitaC
KeymasterI just asked on your previous post what theme you are using and version. Can you provide that here.
Need help with customization or troubleshooting? Reach out to me.
November 14, 2019 at 5:28 am #494686AnitaC
KeymasterYou could have a conflict with the Autoptimize plugin or another plugin. Have you performed a plugin conflict test?
Need help with customization or troubleshooting? Reach out to me.
November 14, 2019 at 7:39 pm #494713Fabio Nodari
ParticipantHi, Sorry for the late reply. I actually disabled the lazyload option in Autoptimize but the lazyload function is still nor working. I am using Magazine Pro and the latest versions of WordPress and Genesis.
November 14, 2019 at 7:53 pm #494715AnitaC
KeymasterYou don't have Jetpack installed do you?
Need help with customization or troubleshooting? Reach out to me.
November 14, 2019 at 8:58 pm #494718Fabio Nodari
ParticipantNovember 14, 2019 at 8:58 pm #494719Fabio Nodari
ParticipantNovember 15, 2019 at 3:23 am #494727CorneliusHansen90
MemberNever cared much for the lazt load function, do you have any suggestions for alternative speed-optimixing approaches, that does not include the lazy load function?
November 15, 2019 at 4:54 am #494729Fabio Nodari
ParticipantNovember 15, 2019 at 12:44 pm #494740AnitaC
Keymaster@nfabiox85 I asked in our Genesis group and received the following response:
Genesis adds the loading attribute via the WordPress wp_get_attachment_image_attributes filter. Images that are output without that filter running will not gain the loading attribute.
This means that after adding the lazy load code to the theme's functions.php file, the only images that will show the loading="lazy" attribute are featured images. Images that are embedded in single posts and pages will not use lazy loading.
I hope that helps. They are updating the docs.
Need help with customization or troubleshooting? Reach out to me.
November 15, 2019 at 10:25 pm #494755Fabio Nodari
ParticipantOk thanks a lot for your explanation Anita. Hopefully in future releases the lazy load function will be implemented in all the images. 🙂
-
AuthorPosts
- The topic ‘Lazy load Genesis 3.2.0’ is closed to new replies.