diff --git a/lisp/org-html.el b/lisp/org-html.el
index b8925e7..2246daf 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1529,7 +1529,8 @@ lang=\"%s\" xml:lang=\"%s\">
"Create image tag with source and attributes."
(save-match-data
(if (string-match "^ltxpng/" src)
- (format "" src)
+ (format ""
+ src (org-find-text-property-in-string 'org-latex-src src))
(let* ((caption (org-find-text-property-in-string 'org-caption src))
(attr (org-find-text-property-in-string 'org-attributes src))
(label (org-find-text-property-in-string 'org-label src)))
Modified lisp/org.el
diff --git a/lisp/org.el b/lisp/org.el
index e30c49a..480e9f1 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15183,7 +15183,12 @@ Some of the options can be changed using the variable
(push ov org-latex-fragment-image-overlays)
(goto-char end))
(delete-region beg end)
- (insert link))))))))
+ (let ((link-beg (point))
+ (link-end (progn (insert link) (point))))
+ (add-text-properties
+ link-beg link-end
+ (list 'org-latex-src
+ (replace-regexp-in-string "\"" "" txt)))))))))))
;; This function borrows from Ganesh Swami's latex2png.el
(defun org-create-formula-image (string tofile options buffer)