Remove Hardcoded Image Extensions
|Reported by:||acumensystems||Owned by:|
As the web changes, browsers support more image extensions. Part of what I'm doing is write plugins that extend Wordpress's ability to thumbnail beyond the norm (PDFs for example).
In order to extend functionality and provide the most support to existing themes, one way is to override functions like wp_attachment_is_image(). Rather than full overriding, it would be better still to change the data their logic is based on. However, these functions do make some unfortunate hard-coded assumptions.
This function, in wp-includes/post.php includes the code:
$image_exts = array('jpg', 'jpeg', 'gif', 'png');
I believe that should refer to a global array. This is not in object scope, so where would be best to place it?
Change History (12)
comment:10 Otto42 — 2 years ago
- Component changed from General to Media
- Milestone changed from Awaiting Review to Future Release