[wp-trac] [WordPress Trac] #28077: Use exif_imagetype instead of getimagesize in file_is_displayable_image

WordPress Trac noreply at wordpress.org
Sun Dec 6 23:11:17 UTC 2015


#28077: Use exif_imagetype instead of getimagesize in file_is_displayable_image
--------------------------------------+------------------------------
 Reporter:  joehoyle                  |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Media                     |     Version:  2.5
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------------
Changes (by joehoyle):

 * keywords:  needs-refresh => has-patch has-unit-tests


Comment:

 Added patch with a new function `wp_get_image_type` which returns the
 IMAGE_TYPE constant for an image, which wraps the usage of
 `exif_imagetype` when available, also added tests.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28077#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list