1.1.0-0 • Published 7 years ago
remark-embed-images-continued v1.1.0-0
remark-embed-images-continued
Embed images with data: URIs, inlining base64-encoded sources. Based on remark-embed-images, which I felt was too restrictive in that all images needed to have a path that began in either
./
or../
to work. Absolute paths failed, web URL:s failed, etc.
Usage
Input:

Process:
const embedImage = require('remark-embed-images-continued');
const vfile = require('to-vfile')
const MARKDOWN = vfile.readSync('myfile.md');
remark()
.use(embedImages)
.process(MARKDOWN, function (err, file) {
vfile.writeSync({path: 'myfile_inlined.md', contents: String(file)});
});
Output:
