#25261 closed enhancement (duplicate)
Improve wp_ext2type() to support image file extensions
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.6 |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
In wp-includes/functions.php there is potential to improve the wp_ext2type() function. It currently doesn't recognise image file extensions.
Although there is a filter available in this function ('ext2type') to use, I'd imagine expected behaviour would be native support for image file extensions without interacting with this filter.
I've attached a simple patch that addresses this - will return 'image' for file extensions 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico' (core allowed image filetypes).
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
Patch to add image file extensions