Você pode usar a seguinte função reescrita para exibir imagens embutidas e imagens da Web (exatamente como a maneira de mostrar imagens embutidas) no modo Org (se o seu ambiente de trabalho estiver no modo Org).
- ao exibir a imagem embutida, ele gera um arquivo em miniatura no disco local e o exibe. Ao usar isso, você pode anotar sua imagem da maneira mais livre possível, sem danificá-la.
- ao exibir a imagem do URL, ele salvará a imagem em uma variável e a exibirá sem nenhum download.
Qualquer extensão pode ser possível. Obviamente, você pode exibir a imagem embutida, mas não gerar o arquivo thumb, alterando-o levemente. Mas eu prefiro o caminho acima.
(defun org-display-inline-images (&optional include-linked refresh beg end)
"Display inline and url images.
Normally only links without a description part are inlined, because this
is how it will work for export. When INCLUDE-LINKED is set, also links
with a description part will be inlined. This
can be nice for a quick
look at those images, but it does not reflect what exported files will look
like.
When REFRESH is set, refresh existing images between BEG and END.
This will create new image displays only if necessary.
BEG and END default to the buffer boundaries."
(interactive "P")
(unless refresh
(org-remove-inline-images)
(if (fboundp 'clear-image-cache) (clear-image-cache)))
(save-excursion
(save-restriction
(widen)
(setq beg (or beg (point-min)) end (or end (point-max)))
(goto-char beg)
(let ((re (concat "\\(\\(http\\)\\|\\(\\[\\[\\(\\(file:\\)\\|\\([./~]\\)\\)\\)\\)\\([^]\n]+?"
(substring (org-image-file-name-regexp) 0 -2)
"\\)" (format "\\(\\(\\]%s\\)\\|\\)" (if include-linked "" "\\]"))))
old file ov img width point-begin point-end)
(while (re-search-forward re end t)
(setq old (get-char-property-and-overlay (match-beginning 1)
'org-image-overlay)
match (match-string-no-properties 0)
point-begin (match-beginning 0)
point-end (match-end 0))
(if (s-starts-with? "http" match)
(save-excursion
(let* ((buffer (url-retrieve-synchronously match))
(unwind-protect
(let ((data (with-current-buffer buffer
(goto-char (point-min))
(search-forward "\n\n")
(buffer-substring (point) (point-max)))))
(require 'image+)
(setq img (imagex--fit-to-size (create-image data 'jpeg t) 400 400)))))))
(setq file (expand-file-name
(concat (or (match-string 6) "") (match-string 7)))
width (if (eq (car (org-element-property :parent (org-element-at-point))) 'table) 200 400))
(when (file-exists-p file)
(let ((file-thumb (format "%s%s_thumb.png" (file-name-directory file) (file-name-base file))))
(if (file-exists-p file-thumb)
(let ((thumb-time (nth 5 (file-attributes file-thumb 'string)))
(file-time (nth 5 (file-attributes file 'string))))
(if (time-less-p thumb-time file-time)
(shell-command (format org-imagemagick-display-command
file width width file-thumb) nil nil)))
(shell-command (format org-imagemagick-display-command
file width width file-thumb) nil nil))
(if (and (car-safe old) refresh)
(image-refresh (overlay-get (cdr old) 'display))
(setq img (save-match-data (create-image file-thumb)))))))
(when img
(setq ov (make-overlay point-begin point-end))
(overlay-put ov 'display img)
(overlay-put ov 'face 'default)
(overlay-put ov 'org-image-overlay t)
(overlay-put ov 'modification-hooks
(list 'org-display-inline-remove-overlay))
(push ov org-inline-image-overlays)))))))