public function getFormatFromMimeType($mimeType, $fallback = '')
    {
        $mimeType = trim(strtolower((string) $mimeType));
        switch ($mimeType) {
            case 'image/png':
                $result = static::FORMAT_PNG;
                break;
            case 'image/jpeg':
                $result = static::FORMAT_JPEG;
                break;
            case 'image/gif':
                $result = static::FORMAT_GIF;
                break;
            case 'image/vnd.wap.wbmp':
                $result = static::FORMAT_WBMP;
                break;
            case 'image/xbm':
            case 'image/x-xbm':
            case 'image/x-xbitmap':
                $result = static::FORMAT_XBM;
                break;
            default:
                $result = $fallback;
                break;
        }

        return $result;
    }