Hi, this seems like the same issue we’re having after updating to a3ll 1.5.0 and WP 4.4.
On category pages we’re loading 10 posts per page, but only the thumbnail for the first one is showing up. From what I can see in the shortcode the problem is that data-src (and also data-lazy-type) is showing up twice in the image tags, except for on the first one. The second data-src points to the placeholder image while the first one is the real post image. The javascript probably catches the second data-src, thereby replacing the placeholder with the placeholder.
I only updated on my local environment so far, so can’t show you on our live site since it still has the old version. To give you an example:
<img width="150" height="150" src="//local/wp-content/plugins/a3-lazy-load/assets/images/placeholder.gif" data-lazy-type="image" data-src="//local/wp-content/plugins/a3-lazy-load/assets/images/placeholder.gif" class="lazy lazy-hidden lazy-hidden attachment-thumbnail size-thumbnail wp-post-image" alt="Bingo Legends: Striving to be the Best" title="Bingo Legends: Striving to be the Best" data-src="https://local/path/to/image.gif" data-lazy-type="image" />
<noscript><img width="150" height="150" src="//local/wp-content/plugins/a3-lazy-load/assets/images/placeholder.gif" class="lazy-hidden attachment-thumbnail size-thumbnail wp-post-image" alt="post title" title="post title" data-src="https://local/path/to/image.gif" data-lazy-type="image" /></noscript>
As you can see, the img tag in noscript is also getting the placeholder image. I’m guessing it’s running the preg_replace on thumbnails twice for some reason, but can’t see where that would happen. The javsscript part seems to be working, besides catching the wrong data-src. I also noticed the noscript version has the placeholder and then the original image in data-src, looking even more like it runs twice.
We include the thumbnails like this in the template:
if (has_post_thumbnail()) {
the_post_thumbnail( 'thumbnail', array( 'alt' => trim( strip_tags( get_the_title() ) ), 'title' => trim( strip_tags( get_the_title() ) ) ) );
} else {
echo "<img src='" . get_stylesheet_directory_uri() . "/images/layout/default-no-image.png' />";
}
I tried turning off noscript, but data-src was still showing up twice in the img tags.
Lazy loading works as expected on other page types, including for example an image gallery – it’s only when looping category posts we’re having an issue with the post thumbnails.