Function: org-html-inline-image-p

org-html-inline-image-p is a byte-compiled function defined in ox-html.el.gz.

Signature

(org-html-inline-image-p LINK INFO)

Documentation

Non-nil when LINK is meant to appear as an image.

INFO is a plist used as a communication channel. LINK is an inline image when it has no description and targets an image file (see org-html-inline-image-rules for more information), or if its description is a single link targeting an image file.

Source Code

;; Defined in /usr/src/emacs/lisp/org/ox-html.el.gz
(defun org-html-inline-image-p (link info)
  "Non-nil when LINK is meant to appear as an image.
INFO is a plist used as a communication channel.  LINK is an
inline image when it has no description and targets an image
file (see `org-html-inline-image-rules' for more information), or
if its description is a single link targeting an image file."
  (if (not (org-element-contents link))
      (org-export-inline-image-p
       link (plist-get info :html-inline-image-rules))
    (not
     (let ((link-count 0))
       (org-element-map (org-element-contents link)
	   (cons 'plain-text org-element-all-objects)
	 (lambda (obj)
	   (pcase (org-element-type obj)
	     (`plain-text (org-string-nw-p obj))
	     (`link (if (= link-count 1) t
		      (cl-incf link-count)
		      (not (org-export-inline-image-p
			    obj (plist-get info :html-inline-image-rules)))))
	     (_ t)))
         info t)))))