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)
comment:10 @Otto42 — 4 years ago
- Component changed from General to Media
- Milestone changed from Awaiting Review to Future Release
comment:15 follow-up: ↓ 16 @SergeyBiryukov — 12 months ago
- Milestone Future Release deleted
comment:16 in reply to: ↑ 15 @ericlewis — 12 months 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