As designed XenForo_Upload::_checkImageState


Well-known member
If i'm using
if ($uploadpath)
            $file = XenForo_Upload::getUploadedFile('upload_file');

            if ($file)
                $file->setConstraints(array('height' => 32, 'width' => 32));

                if ($file->isImage() AND $file->isValid())
in my addon and i'm uploading a bmp, $file->isImage() won't be true because of you extension check.

Any reason why bmp isn't included here?
Last edited:

Chris D

XenForo developer
Staff member
Well, clearly someone does use BMP files still, therefore why I said it could be an oversight :p

But - why use a BMP file?

Can you use another file format?


Well-known member
Bit map files tend to be overly huge, and as Chris said it's not a format that's widely used any more.


XenForo developer
Staff member
Tiff is an image format but we don't include that either.

It only handles "web format" images intentionally.