Index: /branches/6.9/src/wp-includes/compat.php
===================================================================
--- /branches/6.9/src/wp-includes/compat.php	(revision 61333)
+++ /branches/6.9/src/wp-includes/compat.php	(revision 61334)
@@ -615,6 +615,6 @@
 }
 
-// IMAGETYPE_HEIC constant is not yet defined in PHP as of PHP 8.3.
-if ( ! defined( 'IMAGETYPE_HEIC' ) ) {
-	define( 'IMAGETYPE_HEIC', 99 );
-}
+// IMAGETYPE_HEIF constant is only defined in PHP 8.5 or later.
+if ( ! defined( 'IMAGETYPE_HEIF' ) ) {
+	define( 'IMAGETYPE_HEIF', 20 );
+}
Index: /branches/6.9/src/wp-includes/media.php
===================================================================
--- /branches/6.9/src/wp-includes/media.php	(revision 61333)
+++ /branches/6.9/src/wp-includes/media.php	(revision 61334)
@@ -5830,5 +5830,5 @@
 				$size['width'],
 				$size['height'],
-				IMAGETYPE_HEIC,
+				IMAGETYPE_HEIF,
 				sprintf(
 					'width="%d" height="%d"',
Index: /branches/6.9/tests/phpunit/tests/functions.php
===================================================================
--- /branches/6.9/tests/phpunit/tests/functions.php	(revision 61333)
+++ /branches/6.9/tests/phpunit/tests/functions.php	(revision 61334)
@@ -1574,9 +1574,25 @@
 			1180,
 			1180,
-			IMAGETYPE_HEIC,
+			IMAGETYPE_HEIF,
 			'width="1180" height="1180"',
-			'mime' => 'image/heic',
-		);
-		$result   = wp_getimagesize( $file );
+		);
+
+		// As of PHP 8.5.0, getimagesize() supports HEIF/HEIC files.
+		if ( PHP_VERSION_ID >= 80500 ) {
+			$expected = array_merge(
+				$expected,
+				array(
+					'bits'        => 8,
+					'channels'    => 3,
+					'mime'        => 'image/heif',
+					'width_unit'  => 'px',
+					'height_unit' => 'px',
+				)
+			);
+		} else {
+			$expected['mime'] = 'image/heic';
+		}
+
+		$result = wp_getimagesize( $file );
 		$this->assertSame( $expected, $result );
 	}
