Archived topic
When clicking More, featured images don't show
9 replies · Started by Dave on January 17, 2019
I don't know exactly when this started, but when clicking the More button at the bottom of the first page, when new posts are loaded the featured image area remains blank. When deactivating the prior version of Jetpack (6.8.1), the images did load. Hm. Any ideas? Thank you
Hi there,
can you try disabling Photon in the Jetpack settings.
Close, but found it with your suggestion. It's the Jetpack image 'lazy loading' feature that's not compatible. I can easily turn that off, not convinced of benefit (whereas Photon I want). Thank you!
Yes thats the other one :) Glad you found it.
Google Page Speed suggested lazy loading images. I've turned the feature back on in Jetpack, but it's still incompatible with the More button. I'm on the latest theme and plugin. Possible to get a fix in for this at some point? I can also add something manually if you have any ideas. Thanks!
In order for the More button to work with lazy load, we would need to re-initiate lazy load on each More button press.
I'm not sure if there are existing instructions on integrating their lazy load feature with Infinite Scroll, but that would be the best place to start.
If there are instructions, I should be able to help you integrate them.
Found this in Stackoverflow. Could it help? If so, how to implement? Thanks so much for taking a look!
$(document.body).trigger('post-load');
It triggers a jQuery event that the lazy load module is listening for to lazy load images from infinite scroll.
Be cool if that works :)
Could try this:
1. Create a new Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
2. Add this content:
<script>jQuery(document.body).trigger('post-load');</script>
3. Select the WP_Footer hook
4. Set the Display rules to the Blog and Archives.
Didn't work, but thank you. Do we need to attached it to the More button somehow?
I didn't think it would but worth a shot.
I am not sure what the answer is without custom coding. Have you spoke with Jetpack to see if they have any solution?
The thing is having lazy load on the ajax loaded content is a little bit redundant as the images are not being called on load.