protected function embedImage(\Swift_Message $message, \DOMAttr $node, array &$images): void
    {
        if (0 === strpos($node->nodeValue, 'cid:')) {
            return;
        }

        if (isset($images[$node->nodeValue])) {
            $node->nodeValue = $images[$node->nodeValue];
        } else {
            $node->nodeValue = EmbedImageUtil::getLocalPath($node->nodeValue, $this->webDir, $this->hostPattern);
            $cid = $message->embed(\Swift_Image::fromPath($node->nodeValue));
            $images[$node->nodeValue] = $cid;
            $node->nodeValue = $cid;
        }
    }