All Collections
Divi Documentation
Customizing Divi
Blog Module doesn't show Post Images when JetPack Plugin is active.
Blog Module doesn't show Post Images when JetPack Plugin is active.

The Featured Images are not showing on older post pages, except the first page.

Eduard Ungureanu avatar
Written by Eduard Ungureanu
Updated over a week ago

This is happening in most cases due to the usage of the JetPack plugin, which has the LazyLoad Option active.

The LazyLoad script will only run on page load. However, since the Blog Module's pagination is using AJAX requests to load posts on pages 2, 3, etc. (without refreshing the page), the LazyLoad script will not run, making the images of the posts from pages 2, 3, and 4, etc. not to show.

Example of this unwanted behavior:

To fix that without deactivating the LazyLoad option, if you are not using a Child theme, install the Code Snippets plugin, and create a New PHP snippet.

Place the following code:

function dt_lazyload_exclude() {
if( ! empty( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) && strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ]) == 'xmlhttprequest' ){
return false;
}
return true;
}
add_filter( 'lazyload_is_enabled', 'dt_lazyload_exclude', 15 );

If you are using a child theme, you can copy/paste the above PHP snippet into the child theme's functions.php file.

The result, regardless of the method used, would be:


โ€‹

Did this answer your question?