gulp-inline-image-html
v0.2.5
Published
A gulp task for inlining images in HTML
Downloads
241
Maintainers
Readme
gulp-inline-image-html
A Gulp task for inlining images inside HTML. For example,
<img src="test.png"/>
becomes
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEU..."/>
This is a wrapper for inline-images by Max Ogden.
Usage
var gulp = require('gulp')
var inlineimg = require('gulp-inline-image-html')
gulp.task('default', function () {
gulp.src('src/**/*.html')
.pipe(inlineimg('src')) // optionally pass in the base directory for looking for images
.pipe(gulp.dest('dest/'))
})