base64-image-loader

1.2.1 • Public • Published

base64 image loader for webpack

Greenkeeper badge

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

Installation

npm install base64-image-loader

Usage

var fileAsBase64Src = require("base64-image!./file.png");
document.write('<img src="' + fileAsBase64Src + '" />';

Documentation: Using loaders

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)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.1
    28,432
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.1
    28,432
  • 1.2.0
    1,144
  • 1.1.0
    4
  • 1.0.0
    4
  • 0.0.1
    4

Package Sidebar

Install

npm i base64-image-loader

Weekly Downloads

3,506

Version

1.2.1

License

MIT

Last publish

Collaborators

  • jahredhope