Wordpress LScache Plugin: Lazy Load Image Parent Class Name Excludes Bug?
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hey, Since above 3.6.4, there is a bug to do with the Media Excludes tab > Lazy Load Image Parent Class Name Excludes field. In this field, if you enter a value that is actually found anywhere on a page (which for example in the link above youll see the class name heroimage in use in the html for the very first image on the page), it prevents EVERY image on the page from lazy loading. In other words, its not only looking at parent classes, its looking at the whole page. My developer viewed the Git blame on line 553 in media.cls.php on 27th March by hi-hai and we can see the regular expression changed from: $content = preg_replace( #] class=(| )[^ ] . preg_quote( $v, # ) . [^ ] 2[^>] >. #sU, , $content ) to $content = preg_replace( #] class=(| )[^ 2] . preg_quote( $v, # ) . [^ 2] 2[^>] >. #sU, , $content ) If we change roll back this one line of code, we can once again use classes in the Lazy Load Image Parent Class Name Excludes field without problems. We have tested this on multiple sites, on multiple hosts, on multiple recent versions of the plugin and it fails every time. But if we swap out the code as mentioned above, or remove entirely anything from that Lazy Load Image Parent Class Name Excludes field, then it works. The site linked to is running 4.4.1, but with this one change of code applied to it. (so that it works). This topic was modified 1 year, 2 months ago by THP Studio. This topic was modified 1 year, 2 months ago by THP Studio. The page I need help with: https://jacksons4x4.com.au/coil-conversions/ Hi, thanks for the information Ive forwarded it to our devs Best regards, Hi qtwrk, No problem, hope it helps. Tim I saw this problem on my website too! Hi @CacheCrawler ? any update on this one? Thanks for your work on this great plugin. Hi, its on the devs task list for investigation/patch/fix Best regards, Thank you, will keep checking from time to time. Reproduced successfully. Will patch in v4.4.3 Fixed in latest commit.
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference