Variable: image-transform-resize

image-transform-resize is a buffer-local variable defined in image-mode.el.gz.

Documentation

The image resize operation.

Non-nil to resize the image upon first display. Its value should be one of the following:
 - nil, meaning no resizing.
 - t, meaning to scale the image down to fit in the window.
 - fit-window, meaning to fit the image to the window.
 - A number, which is a scale factor (the default size is 1).

There is also support for these values, obsolete since Emacs 29.1:
 - fit-height, meaning to fit the image to the window height.
 - fit-width, meaning to fit the image to the window width.

Resizing will always preserve the aspect ratio of the image.

Probably introduced at or before Emacs version 27.1.

Source Code

;; Defined in /usr/src/emacs/lisp/image-mode.el.gz
(defvar-local image-transform-resize nil
  "The image resize operation.
Non-nil to resize the image upon first display.
Its value should be one of the following:
 - nil, meaning no resizing.
 - t, meaning to scale the image down to fit in the window.
 - `fit-window', meaning to fit the image to the window.
 - A number, which is a scale factor (the default size is 1).

There is also support for these values, obsolete since Emacs 29.1:
 - `fit-height', meaning to fit the image to the window height.
 - `fit-width', meaning to fit the image to the window width.

Resizing will always preserve the aspect ratio of the image.")