A webpack loader that converts images to base64 data URIs suitable for embedding directly in HTML img src attributes. Version 1.2.1 is the current stable release; the project appears to be in maintenance mode with infrequent updates. Unlike generic base64 loaders, this one returns a complete data URI string (e.g., 'data:image/png;base64,...') rather than raw base64, making it easy to drop into img tags without manual prefixing. Supports common image formats via a MIME map but has limited extensibility. Not actively maintained since 2018, and relies on webpack 1.x/2.x conventions — incompatible with modern webpack versions without custom configuration.
npm install base64-image-loaderVerified import paths — ran on the pinned version, not inferred.
Shows how to configure base64-image-loader in webpack config and use it to get a data URI from an image import.
Use a URL loader or copy-webpack-plugin for larger assets.
Use 'rules' array with 'use' property in webpack config.
When using the loader inline, prefix the path with 'base64-image-loader!'.
If you need a new format, fork the package and add to mimes.json, or use a different loader.
Run 'npm install --save-dev base64-image-loader' and ensure your webpack config uses 'base64-image-loader' as the loader.
Replace 'loaders' with 'rules' array: { module: { rules: [ { test: /\.png$/, use: 'base64-image-loader' } ] } }Add custom webpack rules to skip cache or use webpack 1/2/3.
No dependency data recorded yet.