diff --git a/projects/plugins/jetpack/changelog/update-tiled-galleries-enqueue b/projects/plugins/jetpack/changelog/update-tiled-galleries-enqueue new file mode 100644 index 0000000000000..cd980722fb7cb --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-tiled-galleries-enqueue @@ -0,0 +1,4 @@ +Significance: patch +Type: enhancement + +Tiled Galleries: defer loading of the Tiled Gallery script for improved performance. diff --git a/projects/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php b/projects/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php index 1039ae6078fa5..64681be2a7f3a 100644 --- a/projects/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php +++ b/projects/plugins/jetpack/modules/tiled-gallery/tiled-gallery.php @@ -182,7 +182,10 @@ public static function default_scripts_and_styles() { ), array(), JETPACK__VERSION, - false + array( + 'in_footer' => true, + 'strategy' => 'defer', + ) ); wp_enqueue_style( 'tiled-gallery', plugins_url( 'tiled-gallery/tiled-gallery.css', __FILE__ ), array(), '2023-08-21' ); wp_style_add_data( 'tiled-gallery', 'rtl', 'replace' );