• Resolved philip2041

    (@philip2041)


    I 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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Ajay

    (@ajay)

    What is your site URL where you’re displaying the posts? Do you have any other plugin that could be stripping this out?

    Thread Starter philip2041

    (@philip2041)

    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?

    Plugin Author Ajay

    (@ajay)

    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

    Thread Starter philip2041

    (@philip2041)

    Thanks for the info, I will try to deactivate each plugin on my site to find out which plugin conflicts with it.

    Thread Starter philip2041

    (@philip2041)

    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">
    Plugin Author Ajay

    (@ajay)

    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.

    Thread Starter philip2041

    (@philip2041)

    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.

    Thread Starter philip2041

    (@philip2041)

    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!

    Plugin Author Ajay

    (@ajay)

    Thank you for confirming. This will be part of the new release coming soon.

    Thread Starter philip2041

    (@philip2041)

    That’s great! I’m looking forward to the new release.

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.