diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-27 22:39:03 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-27 22:39:03 +0100 |
| commit | 8a3d7bf7bd7c960a29afee293ef7b6a5011fe834 (patch) | |
| tree | 0bca5f331c4dda11252f92fc50a2f115da098710 /lib | |
| parent | 2642cdd90f25528df0d9501200bc95417e60ec82 (diff) | |
Use content type from element when generating HTML
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/document-to-html.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js index e02ca6f..25892d5 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -104,7 +104,7 @@ function DocumentConverter(options) { }, "image": function(element, html, messages, callback) { element.read("base64").then(function(imageBuffer) { - var src = "data:image/png;base64," + imageBuffer; + var src = "data:" + element.contentType + ";base64," + imageBuffer; var attributes = {src: src}; if (element.altText) { attributes.alt = element.altText; |
