#25261 closed enhancement (duplicate)
Improve wp_ext2type() to support image file extensions
| Reported by: | Jonnyauk | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Media | Version: | 3.6 |
| Severity: | minor | Keywords: | has-patch |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch to add image file extensions