Conversion the image to base64 when export to html file on org mode

When export to html file on org mode , did there have an solution which could conversion the local or remote image to base64 content, so that the reciver who I distrbute to could review those image

the org content like


I think I found the solution

(defun org-org-html--format-image (source attributes info)
  (format "<img src=\"data:image/%s+xml;base64,%s\"%s />"
      (or (file-name-extension source) "")
        (insert-file-contents-literally source)
      (file-name-nondirectory source)))
(advice-add #'org-html--format-image :override #'org-org-html--format-image)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.