         
         let linkInfo = richTextView.linkInfo(for: attachment)
         let linkRange = linkInfo?.range
-        let linkURL = linkInfo?.url
         let linkUpdateRange = linkRange ?? richTextView.textStorage.ranges(forAttachment: attachment).first!
         
         if let linkURL = linkInfo?.url {
             detailsViewController.linkURL = linkURL
         }
 
-        detailsViewController.onUpdate = { [weak self] (alignment, size, url, updatedURL, alt, caption) in
+        detailsViewController.onUpdate = { [weak self] (alignment, size, srcURL, linkURL, alt, caption) in
             guard let `self` = self else {
                 return
             }

                }
            }
            
            if let updatedURL = updatedURL {
                self.richTextView.setLink(updatedURL, inRange: linkUpdateRange)
            } else if linkURL != nil {
                self.richTextView.removeLink(inRange: linkUpdateRange)
            }


                updated.alignment = alignment
                updated.size = size
                updated.updateURL(srcURL)

                if let caption = caption, caption.length > 0 {
                    self.richTextView.replaceCaption(for: attachment, with: caption)
