public function getSourceImageUri($hash, $stack, $format = 'jpg', $name = null, $organization = null)
    {
        $apiUri = new Uri($this->client->getConfig('base_uri'));
        $format = strtolower($format);

        // Removing the 'api.' part (third domain level)
        $parts = explode('.', $apiUri->getHost(), 2);
        $baseHost = array_pop($parts);

        $path = UriHelper::composeUri(['stack' => $stack, 'hash' => $hash, 'format' => $format, 'filename' => $name]);
        // Building the URI as "{scheme}://{organization}.{baseHost}[:{port}]/{stackName}/{hash}[/{name}].{format}"
        $parts = [
            'scheme' => $apiUri->getScheme(),
            'port' => $apiUri->getPort(),
            'host' => $this->getOrganizationName($organization).'.'.$baseHost,
            'path' => $path->getPath(),
        ];

        return Uri::fromParts($parts);
    }