diff --git a/includes/plugins/class-perfmatters.php b/includes/plugins/class-perfmatters.php index 7abefc2149..d7ce6abfc6 100644 --- a/includes/plugins/class-perfmatters.php +++ b/includes/plugins/class-perfmatters.php @@ -223,6 +223,13 @@ private static function get_defaults( $options = [] ) { $options['lazyload']['youtube_preview_thumbnails'] = true; $options['lazyload']['image_dimensions'] = true; + $parent_exclusions = empty( $options['lazyload']['lazy_loading_parent_exclusions'] ) ? [] : $options['lazyload']['lazy_loading_parent_exclusions']; + // Add our customizations to the front of the array to avoid confusion when editing the setting in the UI. + $options['lazyload']['lazy_loading_parent_exclusions'] = array_merge( + [ 'wp-block-jetpack-image-compare' ], + $parent_exclusions + ); + // Fonts. if ( ! isset( $options['fonts'] ) ) { $options['fonts'] = [];