# ink-image

> Image component for Ink

Latest version **2.0.0** (published 2019-03-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install ink-image
pnpm add ink-image
yarn add ink-image
bun add ink-image
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-03-07 |
| First published | 2017-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 3 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 84 |
| Author | Kevin Mårtensson |
| Maintainers | kevva, sindresorhus |
| Keywords | ink-component, ink, component, image |

## Links

- npm: https://www.npmjs.com/package/ink-image
- Repository: https://github.com/kevva/ink-image
- Homepage: https://github.com/kevva/ink-image#readme
- Issues: https://github.com/kevva/ink-image/issues
- npm.io page: https://npm.io/package/ink-image

## Dependencies (3)

- [term-img](https://npm.io/package/term-img.md) ^4.0.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [lodash.omit](https://npm.io/package/lodash.omit.md) ^4.5.0

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2019-03-07
- 1.1.1 — 2017-07-23
- 1.1.0 — 2017-07-23
- 1.0.0 — 2017-07-23

## README

# ink-image [![Build Status](https://travis-ci.org/kevva/ink-image.svg?branch=master)](https://travis-ci.org/kevva/ink-image)

> Image component for [Ink](https://github.com/vadimdemedes/ink)

![](screenshot.png)

*Currently only supported on [iTerm >=3](https://www.iterm2.com/downloads.html).*


## Install

```
$ npm install ink-image
```


## Usage

```js
import React from 'react';
import {render} from 'ink';
import Image from 'ink-image';

render(
	<Image preserveAspectRatio src='unicorn.jpg' width='50%'/>
);
```


## API

### `<Image/>`

Besides the props below, it accepts props allowed in [`ansi-escapes`](https://github.com/sindresorhus/ansi-escapes#options).

#### src

Type: `string | Buffer`

Path to an image or the image as a `Buffer`.

#### alt

Type: `string`

Alternative text to show when an image can't be displayed.


## License

MIT © [Kevin Mårtensson](https://github.com/kevva)

---
_Source: https://npm.io/package/ink-image · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
