{"repo":"sindresorhus/terminal-image","free":true,"listed":false,"github":"https://github.com/sindresorhus/terminal-image","clone":"git clone https://github.com/sindresorhus/terminal-image.git","description":"Display images in the terminal","language":"JavaScript","stars":1126,"topics":["terminal-image","image","cli-utility","nodejs","npm-package"],"license":"MIT","category":"media-processing","readme_excerpt":"terminal-image Display images in the terminal Works in any terminal that supports colors. In iTerm, Kitty, WezTerm, and other terminals with graphics support, the image will be displayed in full resolution. In other terminals, it will be rendered using ANSI block characters. Install Usage Optionally, you can specify the height and/or width to scale the image. That can be either the percentage of the terminal window or number of rows and/or columns. Please note that the image will always be scaled to fit the size of the terminal. If width and height are not defined, by default the image will take the width and height of the terminal. It is recommended to use the percentage option. You can set width and/or height as columns and/or rows of the terminal window as well. By default, aspect ratio is always maintained. If you don't want to maintain aspect ratio, set preserveAspectRatio to false. However, your image will be scaled to fit the size of the terminal. API Supports PNG and JPEG images. Animated GIFs are also supported with .gifBuffer and .gifFile . terminalImage.buffer(imageBuffer, options?) terminalImage.file(filePath, options?) Returns a Promise with the ANSI escape codes to display the image. terminalImage.gifBuffer(imageBuffer, options?) terminalImage.gifFile(filePath, options?) Returns a function that can be called to stop the GIF animation. options Type: object height Type: string number Custom image height. Can be set as percentage or number of rows of the terminal. ","default_branch":null,"files":null,"tree":[],"storefront":"/r/sindresorhus","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sindresorhus/terminal-image/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}