[wp-trac] [WordPress Trac] #36418: Custom MIME type icons lost in WP Media List view

WordPress Trac noreply at wordpress.org
Tue Apr 8 13:50:46 UTC 2025


#36418: Custom MIME type icons lost in WP Media List view
--------------------------+------------------------------
 Reporter:  jhorowitz     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |     Focuses:  administration
--------------------------+------------------------------

Comment (by hupe13):

 This works for me, WP 6.8-RC2:

 Change in file /wp-includes/media.php:


 {{{
 function wp_getimagesize( $filename, ?array &$image_info = null ) {
         if ( ! file_exists( $filename ) ) {
                 return false;
         }
 }}}

 Change in file /wp-includes/functions.php:


 {{{
 function wp_get_image_mime( $file ) {
         /*
          * Use exif_imagetype() to check the mimetype if available or fall
 back to
          * getimagesize() if exif isn't available. If either function
 throws an Exception
          * we assume the file could not be validated.
          */

         if ( ! file_exists( $file ) ) {
                 return false;
         }

 }}}

 But I don't have the knowledge to decide whether this applies to everyone.

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


More information about the wp-trac mailing list