diff --git a/load.php b/load.php
index 3d99365045..c04a8ee73a 100644
--- a/load.php
+++ b/load.php
@@ -284,7 +284,9 @@ function perflab_is_standalone_plugin_loaded( $module ) {
*/
function perflab_get_standalone_plugins_constants() {
return array(
- 'images/webp-uploads' => 'WEBP_UPLOADS_VERSION',
+ 'images/dominant-color-images' => 'DOMINANT_COLOR_IMAGES_VERSION',
+ 'images/fetchpriority' => 'FETCHPRIORITY_VERSION',
+ 'images/webp-uploads' => 'WEBP_UPLOADS_VERSION',
);
}
diff --git a/modules/images/dominant-color-images/hooks.php b/modules/images/dominant-color-images/hooks.php
index 5b3395b0c0..045b4be108 100644
--- a/modules/images/dominant-color-images/hooks.php
+++ b/modules/images/dominant-color-images/hooks.php
@@ -244,3 +244,20 @@ function dominant_color_add_inline_style() {
wp_add_inline_style( $handle, $custom_css );
}
add_filter( 'wp_enqueue_scripts', 'dominant_color_add_inline_style' );
+
+/**
+ * Displays the HTML generator tag for the Dominant Color Images plugin.
+ *
+ * See {@see 'wp_head'}.
+ *
+ * @since n.e.x.t
+ */
+function dominant_color_render_generator() {
+ if (
+ defined( 'DOMINANT_COLOR_IMAGES_VERSION' ) &&
+ ! str_starts_with( DOMINANT_COLOR_IMAGES_VERSION, 'Performance Lab ' )
+ ) {
+ echo '' . "\n";
+ }
+}
+add_action( 'wp_head', 'dominant_color_render_generator' );
diff --git a/modules/images/dominant-color-images/load.php b/modules/images/dominant-color-images/load.php
index 019094e2c8..9d1c0ccd1d 100644
--- a/modules/images/dominant-color-images/load.php
+++ b/modules/images/dominant-color-images/load.php
@@ -8,6 +8,13 @@
* @since 1.2.0
*/
+// Define the constant.
+if ( defined( 'DOMINANT_COLOR_IMAGES_VERSION' ) ) {
+ return;
+}
+
+define( 'DOMINANT_COLOR_IMAGES_VERSION', 'Performance Lab ' . PERFLAB_VERSION );
+
// Do not load the code if it is already loaded through another means.
if ( function_exists( 'dominant_color_metadata' ) ) {
return;
diff --git a/modules/images/dominant-color-images/readme.txt b/modules/images/dominant-color-images/readme.txt
new file mode 100644
index 0000000000..b7f0c19dc0
--- /dev/null
+++ b/modules/images/dominant-color-images/readme.txt
@@ -0,0 +1,52 @@
+=== Dominant Color Images ===
+
+Contributors: wordpressdotorg
+Requires at least: 6.1
+Tested up to: 6.2
+Requires PHP: 5.6
+Stable tag: 1.0.0
+License: GPLv2 or later
+License URI: https://www.gnu.org/licenses/gpl-2.0.html
+Tags: performance, images, dominant color
+
+Adds support to store the dominant color of newly uploaded images and create a placeholder background of that color.
+
+== Description ==
+
+This plugin determines and stores the dominant color for newly uploaded images in the media library within WordPress and then uses it to create a placeholder background of that color in the frontend, visible until the image is loaded.
+
+== Installation ==
+
+= Installation from within WordPress =
+
+1. Visit **Plugins > Add New**.
+2. Search for **Dominant Color Images**.
+3. Install and activate the **Dominant Color Images** plugin.
+
+= Manual installation =
+
+1. Upload the entire `dominant-color-images` folder to the `/wp-content/plugins/` directory.
+2. Visit **Plugins**.
+3. Activate the **Dominant Color Images** plugin.
+
+== Frequently Asked Questions ==
+
+= Where can I submit my plugin feedback? =
+
+Feedback is encouraged and much appreciated, especially since this plugin may contain future WordPress core features. If you have suggestions or requests for new features, you can [submit them as an issue in the WordPress Performance Team's GitHub repository](https://github.com/WordPress/performance/issues/new/choose). If you need help with troubleshooting or have a question about the plugin, please [create a new topic on our support forum](https://wordpress.org/support/plugin/dominant-color-images/#new-topic-0).
+
+= Where can I report security bugs? =
+
+The Performance team and WordPress community take security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
+
+To report a security issue, please visit the [WordPress HackerOne](https://hackerone.com/wordpress) program.
+
+= How can I contribute to the plugin? =
+
+Contributions are always welcome! Learn more about how to get involved in the [Core Performance Team Handbook](https://make.wordpress.org/performance/handbook/get-involved/).
+
+== Changelog ==
+
+= 1.0.0 =
+
+* Initial release of the Dominant Color Images plugin as a standalone plugin. ([704](https://github.com/WordPress/performance/pull/704))
diff --git a/modules/images/fetchpriority/hooks.php b/modules/images/fetchpriority/hooks.php
index e6fd54fbef..9a0eb8de4c 100644
--- a/modules/images/fetchpriority/hooks.php
+++ b/modules/images/fetchpriority/hooks.php
@@ -50,3 +50,20 @@ function fetchpriority_filter_post_thumbnail_html( $html ) {
return $html;
}
add_filter( 'post_thumbnail_html', 'fetchpriority_filter_post_thumbnail_html' );
+
+/**
+ * Displays the HTML generator tag for the Fetchpriority plugin.
+ *
+ * See {@see 'wp_head'}.
+ *
+ * @since n.e.x.t
+ */
+function fetchpriority_render_generator() {
+ if (
+ defined( 'FETCHPRIORITY_VERSION' ) &&
+ ! str_starts_with( FETCHPRIORITY_VERSION, 'Performance Lab ' )
+ ) {
+ echo '' . "\n";
+ }
+}
+add_action( 'wp_head', 'fetchpriority_render_generator' );
diff --git a/modules/images/fetchpriority/load.php b/modules/images/fetchpriority/load.php
index 8570331a50..be9f83e445 100644
--- a/modules/images/fetchpriority/load.php
+++ b/modules/images/fetchpriority/load.php
@@ -8,6 +8,13 @@
* @package performance-lab
*/
+// Define the constant.
+if ( defined( 'FETCHPRIORITY_VERSION' ) ) {
+ return;
+}
+
+define( 'FETCHPRIORITY_VERSION', 'Performance Lab ' . PERFLAB_VERSION );
+
// Do not load the code if it is already loaded through another means.
if ( function_exists( 'fetchpriority_img_tag_add_attr' ) ) {
return;
diff --git a/modules/images/fetchpriority/readme.txt b/modules/images/fetchpriority/readme.txt
new file mode 100644
index 0000000000..031851c9a3
--- /dev/null
+++ b/modules/images/fetchpriority/readme.txt
@@ -0,0 +1,52 @@
+=== Fetchpriority ===
+
+Contributors: wordpressdotorg
+Requires at least: 6.1
+Tested up to: 6.2
+Requires PHP: 5.6
+Stable tag: 1.0.0
+License: GPLv2 or later
+License URI: https://www.gnu.org/licenses/gpl-2.0.html
+Tags: performance, images, fetchpriority
+
+Adds a fetchpriority hint for the primary content image on the page to load faster.
+
+== Description ==
+
+This plugin adds the `fetchpriority="high"` attribute to the image that is most likely the LCP image for the current response, improving LCP performance by telling the browser to prioritize that image. The LCP image detection directly relies on the existing WordPress core heuristics that determine whether to not lazy-load an image. The only difference is that, while multiple images may not be lazy-loaded, only a single image will be annotated with `fetchpriority="high"`.
+
+== Installation ==
+
+= Installation from within WordPress =
+
+1. Visit **Plugins > Add New**.
+2. Search for **Fetchpriority**.
+3. Install and activate the **Fetchpriority** plugin.
+
+= Manual installation =
+
+1. Upload the entire `fetchpriority` folder to the `/wp-content/plugins/` directory.
+2. Visit **Plugins**.
+3. Activate the **Fetchpriority** plugin.
+
+== Frequently Asked Questions ==
+
+= Where can I submit my plugin feedback? =
+
+Feedback is encouraged and much appreciated, especially since this plugin may contain future WordPress core features. If you have suggestions or requests for new features, you can [submit them as an issue in the WordPress Performance Team's GitHub repository](https://github.com/WordPress/performance/issues/new/choose). If you need help with troubleshooting or have a question about the plugin, please [create a new topic on our support forum](https://wordpress.org/support/plugin/fetchpriority/#new-topic-0).
+
+= Where can I report security bugs? =
+
+The Performance team and WordPress community take security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
+
+To report a security issue, please visit the [WordPress HackerOne](https://hackerone.com/wordpress) program.
+
+= How can I contribute to the plugin? =
+
+Contributions are always welcome! Learn more about how to get involved in the [Core Performance Team Handbook](https://make.wordpress.org/performance/handbook/get-involved/).
+
+== Changelog ==
+
+= 1.0.0 =
+
+* Initial release of the Fetchpriority plugin as a standalone plugin. ([704](https://github.com/WordPress/performance/pull/704))
diff --git a/plugins.json b/plugins.json
index 05387d89d8..6b924dcb86 100644
--- a/plugins.json
+++ b/plugins.json
@@ -1,4 +1,12 @@
{
+ "images/dominant-color-images": {
+ "slug": "dominant-color-images",
+ "version": "1.0.0"
+ },
+ "images/fetchpriority": {
+ "slug": "fetchpriority",
+ "version": "1.0.0"
+ },
"images/webp-uploads": {
"slug": "webp-uploads",
"version": "1.0.0"