# css-img-datauri-stream

> Transforms CSS image references to inline data URIs

Latest version **0.1.5** (published 2015-08-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install css-img-datauri-stream
pnpm add css-img-datauri-stream
yarn add css-img-datauri-stream
bun add css-img-datauri-stream
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2015-08-05 |
| First published | 2014-11-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | John Brian Kirby |
| Maintainers | jbkirby |
| Keywords | parcelify, css |

## Links

- npm: https://www.npmjs.com/package/css-img-datauri-stream
- Repository: https://github.com/jbkirby/css-img-datauri-stream
- Issues: https://github.com/jbkirby/css-img-datauri-stream/issues
- npm.io page: https://npm.io/package/css-img-datauri-stream

## Dependencies (3)

- [mime](https://npm.io/package/mime.md) ~1.2.11
- [through](https://npm.io/package/through.md) ~2.3.4
- [underscore](https://npm.io/package/underscore.md) ~1.7.0

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 0.1.5 (latest) — 2015-08-05
- 0.1.4 — 2015-07-28
- 0.1.3 — 2015-04-24
- 0.1.2 — 2014-11-13
- 0.1.0 — 2014-11-11

## README

CSS Local Image Reference -> Data URI Transform
======================

Accepts a file argument and an (optional) opts argument. For a CSS file passed as input, returns a [through stream](https://github.com/dominictarr/through) with references to local images replaced by inline [data URIs](http://css-tricks.com/data-uris/). All other files return a vanilla through stream.

The opts argument object may contain the following:
* `maxImageSize` : size (in bytes) beyond which local images references will not be converted to data URIs.

Can be used as a [parcelify](https://github.com/rotundasoftware/parcelify) transform.

Draws heavily from [Grunt Image Embed](https://github.com/ehynds/grunt-image-embed/blob/master/README.md) by [Eric Hynds](https://github.com/ehynds).

#Usage
### css-img-datauri-stream(file [, opts])
* `file` - the CSS file to transform
* `opts` - optional object whose 'maxImageSize' member specifies a byte size beyond which local image references will not be converted to data URIs.

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