phacility/phabricator · error · Exception

Unknown type matched as image MIME type.

Error message

Unknown type matched as image MIME type.

What it means

Error "Unknown type matched as image MIME type." thrown in phacility/phabricator.

Source

Thrown at src/applications/files/storage/PhabricatorFile.php:994

      $this->getViewableMimeType(),
      $matches);
    if (!$ok) {
      return false;
    }

    switch ($matches[1]) {
      case 'jpg';
      case 'jpeg':
        return function_exists('imagejpeg');
        break;
      case 'png':
        return function_exists('imagepng');
        break;
      case 'gif':
        return function_exists('imagegif');
        break;
      default:
        throw new Exception(pht('Unknown type matched as image MIME type.'));
    }
  }

  public static function getTransformableImageFormats() {
    $supported = array();

    if (function_exists('imagejpeg')) {
      $supported[] = 'jpg';
    }

    if (function_exists('imagepng')) {
      $supported[] = 'png';
    }

    if (function_exists('imagegif')) {
      $supported[] = 'gif';
    }

View on GitHub (pinned to 5720a38cfe)

When it happens

Trigger: Thrown at src/applications/files/storage/PhabricatorFile.php:994 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/9f4fdd5e000b365d. Report an issue: GitHub.