Function: eca-chat--image-type-from-media-type

eca-chat--image-type-from-media-type is a natively compiled function defined in eca-chat-image.el.

Signature

(eca-chat--image-type-from-media-type MEDIA-TYPE)

Documentation

Return the Emacs image-type symbol for MEDIA-TYPE, or nil.

Returns nil when MEDIA-TYPE is unknown or the resolved type is not available in this Emacs build (see image-type-available-p).

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat-image.el
;;;; Image building / sizing

(defun eca-chat--image-type-from-media-type (media-type)
  "Return the Emacs `image-type' symbol for MEDIA-TYPE, or nil.
Returns nil when MEDIA-TYPE is unknown or the resolved type is not
available in this Emacs build (see `image-type-available-p')."
  (when-let* ((sym (alist-get media-type eca-chat--media-type->image-type
                              nil nil #'string=)))
    (and (image-type-available-p sym) sym)))