We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f3631e commit 294dca8Copy full SHA for 294dca8
tests/phpunit/tests/functions.php
@@ -1575,8 +1575,26 @@ public function test_wp_getimagesize_heic() {
1575
1180,
1576
IMAGETYPE_HEIC,
1577
'width="1180" height="1180"',
1578
- 'mime' => 'image/heic',
1579
);
+
1580
+ /*
1581
+ * As of PHP 8.5.0, getimagesize() supports HEIF/HEIC files.
1582
+ */
1583
+ if ( PHP_VERSION_ID >= 80500 ) {
1584
+ $expected = array_merge(
1585
+ $expected,
1586
+ array(
1587
+ 'bits' => 8,
1588
+ 'channels' => 3,
1589
+ 'mime' => 'image/heif',
1590
+ 'width_unit' => 'px',
1591
+ 'height_unit' => 'px',
1592
+ )
1593
+ );
1594
+ } else {
1595
+ $expected['mime'] = 'image/heic';
1596
+ }
1597
1598
$result = wp_getimagesize( $file );
1599
$this->assertSame( $expected, $result );
1600
}
0 commit comments