Improve wp_ext2type() to support image file extensions
|Reported by:||Jonnyauk||Owned by:|
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).