Variable: image-auto-resize

image-auto-resize is a customizable variable defined in image-mode.el.gz.

Value

t

Documentation

Non-nil to resize the image upon first display.

Its value should be one of the following:
 - nil, meaning no resizing.
 - t, meaning to fit the image to the window height and width.
 - fit-height, meaning to fit the image to the window height.
 - fit-width, meaning to fit the image to the window width.
 - A number, which is a scale factor (the default size is 1).

This variable was added, or its default value changed, in Emacs 27.1.

Probably introduced at or before Emacs version 27.1.

Source Code

;; Defined in /usr/src/emacs/lisp/image-mode.el.gz
(defcustom image-auto-resize t
  "Non-nil to resize the image upon first display.
Its value should be one of the following:
 - nil, meaning no resizing.
 - t, meaning to fit the image to the window height and width.
 - `fit-height', meaning to fit the image to the window height.
 - `fit-width', meaning to fit the image to the window width.
 - A number, which is a scale factor (the default size is 1)."
  :type '(choice (const :tag "No resizing" nil)
                 (other :tag "Fit height and width" t)
                 (const :tag "Fit height" fit-height)
                 (const :tag "Fit width" fit-width)
                 (number :tag "Scale factor" 1))
  :version "27.1"
  :group 'image)