Image component for Ink
Currently only supported on iTerm >=3.
$ npm install ink-image
import React from 'react';
import {render} from 'ink';
import Image from 'ink-image';
render(
<Image preserveAspectRatio src='unicorn.jpg' width='50%'/>
);
Besides the props below, it accepts props allowed in ansi-escapes
.
Type: string | Buffer
Path to an image or the image as a Buffer
.
Type: string
Alternative text to show when an image can't be displayed.
MIT © Kevin Mårtensson