public static function fromExtension(string $extension): MediaType
    {
        if (!self::isKnownExtension($extension)) {
            throw new \InvalidArgumentException(sprintf('Unknown extension "%s" given.', $extension));
        }

        return new self(self::$knownTypes[strtolower($extension)]);
    }