#60910
closed
defect (bug)
( fixed )
WP 6.5: the code add support for AVIF image files in WordPress not work now
|
|
|
|
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Description (last modified by )
function add_avif_to_upload_mimes($mime_types) { $mime_types['avif'] = 'image/avif'; $mime_types['avifs'] = 'image/avif-sequence'; return $mime_types; } add_filter('upload_mimes', 'add_avif_to_upload_mimes'); // Enable preview / thumbnail for avif image files. function avif_is_displayable($result, $path) { if ($result === false) { $displayable_image_types = array( IMAGETYPE_JPC, IMAGETYPE_JP2, IMAGETYPE_JPX ); $info = @getimagesize( $path ); if (empty($info)) { $result = false; } elseif (!in_array($info[2], $displayable_image_types)) { $result = false; } else { $result = true; } } return $result; } add_filter('file_is_displayable_image', 'avif_is_displayable', 10, 2);
Attachments (1)
Change History (21)
#1
@
6 months ago
-
Component changed from Formatting to Media -
Description modified ( diff ) -
Keywords close added; changes-requested needs-patch removed
-
Either you are not using PHP 8.1+, or -
You are using PHP 8.1+ but GD has not been compiled with AVIF support
#2
@
6 months ago
#3
@
6 months ago
This ticket was mentioned in Slack in #core-media by azaozz. View the logs .
6 months ago
#5
@
6 months ago
-
Keywords reporter-feedback added
Using AVIF images in WordPress even after adding code that supports AVIF image files in WordPress by adding the AVIF and AVIFS MIME types to the function.php file is not currently possible. This was possible in previous versions.
There is an open feature request here that you can vote and comment on if this is a feature you would like to see added
#6
@
6 months ago
#8
@
6 months ago
-
Keywords avif added
After updating WP to 6.5 I can no longer do this
-
are you blocked from uploading new AVIF images since 6.5? -
how are you trying to upload the AVIF images?
#9
@
6 months ago
This ticket was mentioned in Slack in #core-media by antpb. View the logs .
6 months ago
#11
@
6 months ago
-
Milestone changed from Awaiting Review to six point six -
Owner set to adamsilverstein
This ticket was mentioned in PR #6627 on WordPress/wordpress-develop by @adamsilverstein .
4 months ago
#12
-
Keywords has-patch added
@adamsilverstein commented on PR #6627 :
4 months ago
#14
#15
in reply to: ↑ 13
@
4 months ago
-
Resolution fixed deleted -
Status changed from closed to reopened
In fifty-eight thousand three hundred and five :
Fix an issue where the GD image library falsely reports supporting the AVIF format
This ticket was mentioned in Slack in #core-media by antpb. View the logs .
4 months ago
#17
@
3 months ago
This (checking that imageavif exists) doesn't fix the problem. AVIF functions are available, even though AVIF support isn't there.
#18
@
3 months ago
-
Milestone six point six deleted -
Resolution set to wontfix -
Status changed from reopened to closed