[wp-trac] [WordPress Trac] #28077: Use exif_imagetype instead of getimagesize in file_is_displayable_image
WordPress Trac
noreply at wordpress.org
Wed Apr 30 17:14:35 UTC 2014
#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: 3.9
Severity: normal | Keywords:
Focuses: |
-------------------------+-----------------------------
From http://us3.php.net/manual/en/function.exif-imagetype.php:
> exif_imagetype — Determine the type of an image
> When a correct signature is found, the appropriate constant value will
be returned otherwise the return value is FALSE. The return value is the
same value that getimagesize() returns in index 2 but exif_imagetype() is
much faster.
For whatever reason, `getimagesize` also fails to read the type from a
Custom Stream Wrapper, whereas `exif_imagetype` reports that correctly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28077>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list