Lazy loading for iframes ? exclude reCAPTCHA v2




Wordpress LScache Plugin: Lazy loading for iframes ? exclude reCAPTCHA v2

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hiya, Lazy loading for iframes breaks reCAPTCHA v2. Is there any way to exclude particular iframes from lazy loading, or somehow have it ignore reCAPTCHA? Thanks Hi, Could you please try add the attribute data-no-lazy=1 to it ? and see how it goes , I looked at the source code: private function _parse_iframe() ... ... ... if ( ! empty( $attrs[ data-no-lazy ] ) || ! empty( $attrs[ data-lazyloaded ] ) || ! empty( $attrs[ data-src ] ) ) LiteSpeed_Cache_Log::debug2( [Media] bypassed ) continue that attributes should make it bypass this certain one to be lazy-laoded. Best regards, Well, this is going to be somewhat problematic because reCAPTCHA iframe is added by a form builder plugin (namely Quform), theres no possibility to add the attribute without modifying the plugin code. I assume it would make sense for LiteSpeed Cache to be able to recognize reCAPTCHA iframes and exclude them from lazy loading since the same issue will probably happen with other form builders. Hi, Thanks , will forward to developers. Please manually edit the file for the time being. Best regards,



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference