esbuild plugin that conditionally inlines images as data URLs when under a size threshold, switching loader between 'file' and 'dataurl' like Webpack's url-loader. Version 0.0.9 is the latest stable release. It supports configurable size limits via options or environment variable, custom file extensions, namespace isolation, and multiple plugin instances for per-extension rules. Smaller and simpler than full custom build setups, but has limited community adoption and ongoing maintenance uncertainty. Works only with esbuild's onLoad hook.
npm install esbuild-plugin-inline-imageVerified import paths — ran on the pinned version, not inferred.
Shows how to require and use the plugin with esbuild, inlining images under 10KB.
Use CommonJS require or ESM default import. Avoid named import.
Either omit filter and let plugin auto-register loaders, or set loader manually in esbuild config.
If you want to disable completely, remove the plugin rather than setting limit to 0.
Prefer passing limit in plugin options explicitly.
Run 'npm install esbuild-plugin-inline-image' in your project root.
Use 'const inlineImage = require("esbuild-plugin-inline-image");' (default import).Ensure plugin is included in plugins array and extensions list matches the image files. If using a custom filter, also set loader manually in esbuild build config.
No dependency data recorded yet.