MCPcopy Create free account
hub / github.com/TruthHun/BookStack / readImage

Function readImage

static/word2md/mammoth.browser.js:1262–1273  ·  view source on GitHub ↗
(imageFile, altText)

Source from the content-addressed store, hash-verified

1260 }
1261
1262 function readImage(imageFile, altText) {
1263 var contentType = contentTypes.findContentType(imageFile.path);
1264
1265 var image = documents.Image({
1266 readImage: imageFile.read,
1267 altText: altText,
1268 contentType: contentType
1269 });
1270 var warnings = supportedImageTypes[contentType] ?
1271 [] : warning("Image of type " + contentType + " is unlikely to display in web browsers");
1272 return elementResultWithMessages(image, warnings);
1273 }
1274
1275 function undefinedStyleWarning(type, styleId) {
1276 return warning(

Callers 2

readBlipFunction · 0.70
readImageDataFunction · 0.70

Calls 2

warningFunction · 0.70

Tested by

no test coverage detected