diff --git a/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php b/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php index e7533f587d..a8def135e0 100644 --- a/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php +++ b/inc/Engine/Optimization/LazyRenderContent/Frontend/Controller.php @@ -147,7 +147,7 @@ public function add_hashes( $html ) { * * @param string $processor The processor to use. */ - $processor = wpm_apply_filters_typed( 'string', 'rocket_lrc_processor', 'dom' ); + $processor = wpm_apply_filters_typed( 'string', 'rocket_lrc_processor', extension_loaded( 'dom' ) ? 'dom' : 'regex' ); $this->processor->set_processor( $processor ); $this->processor->get_processor()->set_exclusions( $this->get_exclusions() );