Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jahredhope/base64-image-loader

base64 image loader for webpack
https://github.com/jahredhope/base64-image-loader

npm-package

Last synced: about 1 month ago
JSON representation

base64 image loader for webpack

Awesome Lists containing this project

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('';
```

[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)