diff --git a/dist/showdown.js b/dist/showdown.js
index 36c74cd..5482a2a 100644
Binary files a/dist/showdown.js and b/dist/showdown.js differ
diff --git a/dist/showdown.js.map b/dist/showdown.js.map
index 00aa3de..d25a535 100644
Binary files a/dist/showdown.js.map and b/dist/showdown.js.map differ
diff --git a/dist/showdown.min.js b/dist/showdown.min.js
index a298817..5a400d5 100644
Binary files a/dist/showdown.min.js and b/dist/showdown.min.js differ
diff --git a/dist/showdown.min.js.map b/dist/showdown.min.js.map
index 4889b77..8203460 100644
Binary files a/dist/showdown.min.js.map and b/dist/showdown.min.js.map differ
diff --git a/src/options.js b/src/options.js
index afefab0..0f6cb95 100644
--- a/src/options.js
+++ b/src/options.js
@@ -46,6 +46,11 @@ function getDefaultOpts (simple) {
describe: 'Turn on/off image dimension parsing',
type: 'boolean'
},
+ extractImageCaptions: {
+ defaultValue: false,
+ describe: 'Extract image alt tag as a caption for the image',
+ type: 'boolean'
+ },
simplifiedAutoLink: {
defaultValue: false,
describe: 'Turn on/off GFM autolink style',
diff --git a/src/subParsers/makehtml/images.js b/src/subParsers/makehtml/images.js
index 63d9f09..1b41c92 100644
--- a/src/subParsers/makehtml/images.js
+++ b/src/subParsers/makehtml/images.js
@@ -59,7 +59,13 @@ showdown.subParser('makehtml.images', function (text, options, globals) {
.replace(showdown.helper.regexes.asteriskDashTildeAndColon, showdown.helper.escapeCharactersCallback);
//url = showdown.helper.escapeCharacters(url, '*_', false);
url = url.replace(showdown.helper.regexes.asteriskDashTildeAndColon, showdown.helper.escapeCharactersCallback);
- var result = '';
+ }
+
+ result += '';
+ if (options.extractImageCaptions && altText) {
+ result += '