protected function prepareImageUrl(string $format, string $encodedPuml): void
    {
        $server = $this->getServer();
        $this->log("Server: $server", Project::MSG_VERBOSE);

        $server = filter_var($server, FILTER_VALIDATE_URL);
        if ($server === false) {
            $message = 'Invalid PlantUml server';
            $this->log($message, Project::MSG_ERR);
            throw new BuildException($message);
        }

        $imageUrl = sprintf('%s/%s/%s', rtrim($server, '/'), $format, $encodedPuml);
        $this->log($imageUrl, Project::MSG_DEBUG);
        $this->setUrl($imageUrl);
    }