# base64-image-loader

> base64 image loader for webpack

Latest version **1.2.1** (published 2017-12-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install base64-image-loader
pnpm add base64-image-loader
yarn add base64-image-loader
bun add base64-image-loader
```

## 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 | 1.2.1 |
| Published | 2017-12-09 |
| First published | 2016-05-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Jahred Hope |
| Maintainers | jahredhope |
| Keywords | base64, image, webpack, loader, img, src, img src |

## Links

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

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2017-12-09
- 1.2.0 — 2016-11-10
- 1.1.0 — 2016-10-27
- 1.0.0 — 2016-05-29
- 0.0.1 — 2016-05-06

## README

# base64 image loader for webpack

[![Greenkeeper badge](https://badges.greenkeeper.io/jahredhope/base64-image-loader.svg)](https://greenkeeper.io/)

![](https://travis-ci.org/jahredhope/base64-image-loader.svg?branch=master)

Easily switched out for a url loader this loader can be injected directly into an img src tag

If your looking for a loader that simple encodes as base64 try [base64-loader](https://github.com/antelle/base64-loader)

## Installation

`npm install base64-image-loader`

## Usage

``` javascript
var fileAsBase64Src = require("base64-image!./file.png");
document.write('<img src="' + fileAsBase64Src + '" />';
```

[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)

## Support

See ./mimes.json for currently supported extensions/mimes.  
Create a Pull Request if you need more added.  

## License

MIT (http://www.opensource.org/licenses/mit-license.php)

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