Can WordPress resize BMP files?

Interesting situation i just ran into.

I have a site I am developing in which I have defined specific image sizes I want created whenever a new image is uploaded. Currently lets just say that I defined a specific thumbnail size of 75×75 and a medium sized image of 150×150 pixels.

Assuming we proceed to upload a new image using the built in media uploader we would expect that WordPress will automatically upload and store the original image along with any additional images sizes which I have specified in my functions.php file (in this case the 75×75 and 150×150 pixel images).

First of all, the above illustrated example is indeed working perfectly and I am very happy with the results.

What I have noticed though is that when you pick a bmp file to upload the automatic resizing does not take place.

My objective here is to figure out who else might have noticed this issue while attempting to find a solution for this problem. I need to ensure that even when a large bmp file is uploaded that the code

the_post_thumbnail( array(50,50), 'class=alignleft' );

will show the 50×50 pixel image.

Just in case anyone is interested, I have confirmed this issue is specifically related to bmp image by taking the original bmp image and saving it as a jpg and png file through photoshop and then using the wordpress media manager to upload the same files converted by photoshop… In both cases I noticed that after uploading each converted file the exact same images WERE correctly being resized.

I should also point out that when a bmp file image was uploaded the actual upload of that file DID take place however in the media manager only the original (full size) image was available to insert into posts and checking the media upload folder also only showed a single image.

Any guidance, help or diagnosis is greatly appreciated!

2 Answers
2

No, wordpress can not resize BMP files. Beware that it does not make sense to use BMP files in a website because a broad number of webbrowsers is not able to display them.

Filetypes that are supported by WordPress and which are widely supported by internet browsers are: GIF, JPG and PNG.

Those formats are optimized for internet use as they compress image data. BMP is a common image format but not in the internet because it has large file sizes.

Leave a Comment