diff --git a/wp-includes/media.php b/wp-includes/media.php index bfd71cdcb3..804a34f6ac 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1962,6 +1962,12 @@ function wp_img_tag_add_loading_attr( $image, $context ) { * @return string Converted `img` tag with `decoding` attribute added. */ function wp_img_tag_add_decoding_attr( $image, $context ) { + // Only apply the decoding attribute to images that have a src attribute that + // starts with a double quote, ensuring escaped JSON is also excluded. + if ( false === strpos( $image, ' src="' ) ) { + return $image; + } + /** * Filters the `decoding` attribute value to add to an image. Default `async`. * diff --git a/wp-includes/version.php b/wp-includes/version.php index f6aa7808a3..d9579c03ba 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1.1-alpha-54806'; +$wp_version = '6.1.1-alpha-54807'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.