[wp-trac] [WordPress Trac] #53121: wp_get_image_mime() - something weird going on

WordPress Trac noreply at wordpress.org
Fri Apr 30 23:49:08 UTC 2021


#53121: wp_get_image_mime() - something weird going on
--------------------------+------------------------------
 Reporter:  jrf           |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  4.8
 Severity:  minor         |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:5 jrf]:
 > We may need to dig deeper into the PHP side of things there, but based
 on those tests I ran, it would appear that `getimagesize()` is always
 available, independently of GD.
 > If that's the case, we could most likely simplify the
 `wp_get_image_mime()` function.

 Just noting that there is indeed a
 [https://www.php.net/manual/en/function.getimagesize.php#refsect1-function
 .getimagesize-notes note in the PHP documentation]:
 > Note: This function does not require the GD image library.

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


More information about the wp-trac mailing list