Commit d10887c93d for wordpress.org

commit d10887c93d8e55863705256b18f1176e32c218d1
Author: Adam Silverstein <adamsilverstein@earthboundhosting.com>
Date:   Tue Sep 17 23:29:29 2024 +0000

    Media: improve speed of AVIF image generation.

    Set the AVIF encoder to work faster by raising heic:speed to 7 from the default of 5. AVIF generation time is reduced by up to 20% with minimal impact on image size.

    Props: adamsilverstein, erikyo, mukesh27, yguyon, felixarntz, jzern.
    Fixes #61758.



    Built from https://develop.svn.wordpress.org/trunk@59042


    git-svn-id: http://core.svn.wordpress.org/trunk@58438 1a063a9b-81f0-0310-95a4-ce76da25c4cd

diff --git a/wp-includes/class-wp-image-editor-imagick.php b/wp-includes/class-wp-image-editor-imagick.php
index 819be5e090..72b1e42d41 100644
--- a/wp-includes/class-wp-image-editor-imagick.php
+++ b/wp-includes/class-wp-image-editor-imagick.php
@@ -219,6 +219,11 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
 						$this->image->setImageCompressionQuality( $quality );
 					}
 					break;
+				case 'image/avif':
+					// Set the AVIF encoder to work faster, with minimal impact on image size.
+					$this->image->setOption( 'heic:speed', 7 );
+					$this->image->setImageCompressionQuality( $quality );
+					break;
 				default:
 					$this->image->setImageCompressionQuality( $quality );
 			}
diff --git a/wp-includes/version.php b/wp-includes/version.php
index b0ff11ac4e..8ab48e593e 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
  *
  * @global string $wp_version
  */
-$wp_version = '6.7-alpha-59041';
+$wp_version = '6.7-alpha-59042';

 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.