qiaofan / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

Invalid src mime type: image/bmp #177

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

I am using the Wordpress theme "Whoswho" 
(http://www.elegantthemes.com/gallery/whoswho/) which implements timthumb into 
it.

I've also installed the plugin 'WP-o-Matic' in order to fetch RSS data from ABC 
News Online (our news affiliate).  Most of the images it fetches display just 
as they should, because their mime type is 'jpg'.

However, a few of the images say that the mime type is 'bmp'.  While looking 
through the timthumb.php our site is using, I see no mention of 'bmp' anywhere.

What puzzles me, is that the link to the image 
(http://supertalknews.com/wp-content/themes/news/timthumb.php?src=http://abcnews
radioonline.com/storage/news-images/N_040711_Airtrafficcontroltower_ABCNews.jpg?
__SQUARESPACE_CACHEVERSION=1302186701863&h=120&w=120&zc=1&q=90) clearly shows 
that the image is in fact a 'jpg'.

So not only would I like to know what it is that I'm missing here (maybe a 
quick mimetype addition in cpanel?), but also how to allow for 'bmp' files to 
be displayed in timthumb.

It may be as simple as upgrading to a later version of timthumb, but I really 
don't want to mess up anything this theme in place.

Any help would be appreciated.

Original issue reported on code.google.com by jaymoo...@gmail.com on 8 Apr 2011 at 5:36

GoogleCodeExporter commented 8 years ago
Image extensions can be changed. TimThumb uses the mimetype set inside the 
image (this functionality is built into the GD image library that TimThumb 
uses).

This means that either the image is a bmp that has been renamed to a jpg, or GD 
is getting confused for some reason. Either way, GD can't resize bmp file 
format images, and so will not work properly with those pictures. This can't be 
fixed in the PHP

Original comment by BinaryMoon on 20 Jun 2011 at 3:41