Conversation
supportI found that the thumbnails of the related posts don’t have lazy load attribute, which is added to other images by default. How to add it? I tried to ask GPT, it told me to add a filter in functions.php, but that doesn’t work. Please help.
What is your site URL where you’re displaying the posts? Do you have any other plugin that could be stripping this out?
I have temporarily deactivated the plugin since it increases loading time without lazy load. I think it’s not because of plugin confliction, maybe lazy load is not a in-built feature of your plugin?
It is and has been for quite some time. I uses WordPress’ inbuilt function which then chooses when to apply the lazy load HTML etc. https://github.com/WebberZone/contextual-related-posts/blob/4.1.0/includes/frontend/class-media-handler.php#L328
Thanks for the info, I will try to deactivate each plugin on my site to find out which plugin conflicts with it.
I disabled all other plugins, and the issue persists, the code of the image is like this: <img width="150" height="150" src="https://mydomain.com/wp-content/uploads/2025/07/img-name-150x150.jpg" class="crp_featured crp_thumb thumbnail" alt="image-alt-text" style="" title="post title">
Thank you for the detailed checking. I’ve been working on a new version of the plugin and one of the key things in there is partially forcing the lazy attribute vs relying on WP to decide. https://github.com/WebberZone/contextual-related-posts/releases/tag/4.2.0-beta1 This should be out soon, but if you’d like to give this a try, it’s in the repo above. As always, I suggest running this on a staging site.
Maybe something is wrong with my theme or other settings. And great to hear that a new version is coming! I will try the beta version when I have time.
Hi Ajay, I just tested the beta version, the thumbnails now have the lazy load attribute added! I’m really happy to see the attribute showing! You’ve been a lifesaver, thanks so much!
Thank you for confirming. This will be part of the new release coming soon.
That’s great! I’m looking forward to the new release.
What is your site URL where you’re displaying the posts? Do you have any other plugin that could be stripping this out?
I have temporarily deactivated the plugin since it increases loading time without lazy load. I think it’s not because of plugin confliction, maybe lazy load is not a in-built feature of your plugin?
It is and has been for quite some time. I uses WordPress’ inbuilt function which then chooses when to apply the lazy load HTML etc. https://github.com/WebberZone/contextual-related-posts/blob/4.1.0/includes/frontend/class-media-handler.php#L328
Thanks for the info, I will try to deactivate each plugin on my site to find out which plugin conflicts with it.
I disabled all other plugins, and the issue persists, the code of the image is like this: <img width="150" height="150" src="https://mydomain.com/wp-content/uploads/2025/07/img-name-150x150.jpg" class="crp_featured crp_thumb thumbnail" alt="image-alt-text" style="" title="post title">
Thank you for the detailed checking. I’ve been working on a new version of the plugin and one of the key things in there is partially forcing the lazy attribute vs relying on WP to decide. https://github.com/WebberZone/contextual-related-posts/releases/tag/4.2.0-beta1 This should be out soon, but if you’d like to give this a try, it’s in the repo above. As always, I suggest running this on a staging site.
Maybe something is wrong with my theme or other settings. And great to hear that a new version is coming! I will try the beta version when I have time.
Hi Ajay, I just tested the beta version, the thumbnails now have the lazy load attribute added! I’m really happy to see the attribute showing! You’ve been a lifesaver, thanks so much!
Thank you for confirming. This will be part of the new release coming soon.
That’s great! I’m looking forward to the new release.