Display images in your terminal
Even animated gifs!
Currently only supported on iTerm >=2.9.
$ npm install --save term-img2
const termImg = require('term-img2');
termImg('unicorn.jpg', {log: true});
Type: string
buffer
Filepath to an image or an image as a buffer.
Type: string
number
The width and height are given as a number followed by a unit, or the word "auto".
N
: N character cells.Npx
: N pixels.N%
: N percent of the session's width or height.auto
: The image's inherent size will be used to determine an appropriate dimension.
Type: boolean
Default: true
Type: boolean
Log image in terminal, false
by default.
Type: function
Default: () => throw new UnsupportedTerminal()
Enables you to do something else when the terminal doesn't support images.
Type: string
The image string that can be displayed in terminal.
- imgcat - CLI for this module
MIT © EGOIST