Convert and replace image-files within your DOM/HTML to base64-encoded data.
var gulp = require('gulp');
var file64 = require('gulp-file64');
gulp.task('default', function () {
gulp.src('index.html')
.pipe(file64())
.pipe(gulp.dest('path'));
});
<html>
<head>
</head>
<body>
<img src="sample.png" />
...
MIT © rakesh0r