Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#50557 closed defect (bug) (fixed)

The file extension .heic is defined as an image into `wp_get_mime_types()` but not in `wp_get_ext_types()`

Reported by: imath's profile imath Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.5
Component: Media Keywords: has-patch
Focuses: Cc:

Description

Hi,

I just noticed a failing test in the BuddyPress PHPunit tests since [48288]. Our test is failing because 'image' !== wp_ext2type( 'heic' ). I was wondering if the fact the .heic extension was not into the returned array of the wp_get_ext_types() function was intentional or not.

If not I'm suggesting the attached patch. If so I'll fix the BuddyPress unit tests ignoring the .heic extension.

Thanks in advance for your time.

Attachments (1)

50557.patch (935 bytes) - added by imath 4 years ago.

Download all attachments as: .zip

Change History (4)

@imath
4 years ago

#1 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 5.5

#2 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 48296:

Media: Add heic extension to wp_get_ext_types(), for consistency with wp_get_mime_types().

Follow-up to [48288].

Props imath.
Fixes #50557. See #42775.

#3 @azaozz
4 years ago

Thanks for the fix :)

Wasn't sure what's best for "non-displayable images". Same for tif, tiff and probably for bmp. Currently they are treated as images (as the mime type is image/*) but then when creating the attachment post for the uploaded file, image meta is also created for them which seems wrong as they can only be used as "files". Worth another ticket for 5.6.

Version 0, edited 4 years ago by azaozz (next)
Note: See TracTickets for help on using tickets.