[wp-trac] [WordPress Trac] #27997: supports_mime_type not accounting for possibly different jpg mimetypes
WordPress Trac
noreply at wordpress.org
Wed Apr 23 21:28:50 UTC 2014
#27997: supports_mime_type not accounting for possibly different jpg mimetypes
-----------------------------+-----------------------------
Reporter: joetan | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Post Thumbnails | Version: 3.9
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
Ran into a situation where supports_mime_type() in the WP_Image_Editor_GD
class was being called with the $mime_type parameter set as "image/jpg"
this causes it to fail, since the function is looking for "image/jpeg",
even though the image is actually a jpg
The result of this function failing, is that post thumbnails don't get
generated for images.
simple fix to this, add a test for "image/jpg' to the switch statement:
{{{
class-wp-image-editor-gd.php:
switch( $mime_type ) {
case 'image/jpg':
case 'image/jpeg':
return ($image_types & IMG_JPG) != 0;
...
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27997>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list