The arguments are formatted askey=valuewith a semicolon between each key-value pair. They are described below:
Key | | Description of value
-- | -- | --
name | | base-64 encoded filename. Defaults to "Unnamed file".
size | | File size in bytes. The file transfer will be canceled if this size is exceeded.
width | | Optional. Width to render. See notes below.
height | | Optional. Height to render. See notes below.
preserveAspectRatio | | Optional. If set to 0, then the image's inherent aspect ratio will not be respected; otherwise, it will fill the specified width and height as much as possible without stretching. Defaults to 1.
inline | | Optional. If set to 1, the file will be displayed inline. Otherwise, it will be downloaded with no visual representation in the terminal session. Defaults to 0.
The width and height are given as a number followed by a unit, or the word "auto".
N:Ncharacter cells.
Npx:Npixels.
N%:Npercent of the session's width or height.
auto: The image's inherent size will be used to determine an appropriate dimension.
Describe the solution you'd like
Protocol
iTerm2 extends the xterm protocol with a set of proprietary escape sequences. In general, the pattern is:
Whitespace is shown here for ease of reading: in practice, no spaces should be used.
For file transfer and inline images, the code is:
The arguments are formatted as
Key | | Description of value -- | -- | -- name | | base-64 encoded filename. Defaults to "Unnamed file". size | | File size in bytes. The file transfer will be canceled if this size is exceeded. width | | Optional. Width to render. See notes below. height | | Optional. Height to render. See notes below. preserveAspectRatio | | Optional. If set to 0, then the image's inherent aspect ratio will not be respected; otherwise, it will fill the specified width and height as much as possible without stretching. Defaults to 1. inline | | Optional. If set to 1, the file will be displayed inline. Otherwise, it will be downloaded with no visual representation in the terminal session. Defaults to 0.key=value
with a semicolon between each key-value pair. They are described below:The width and height are given as a number followed by a unit, or the word "auto".