Support thumbnails for non-image media types
|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 (19)
- Component changed from General to Media
- Milestone changed from Awaiting Review to Future Release
3 years ago
- Milestone Future Release deleted
in reply to:
3 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
- Summary changed from Remove Hardcoded Image Extensions to Support thumbnails for non-image media types