MCPcopy Index your code
hub / github.com/blueimp/JavaScript-Load-Image / displayThumbnailImage

Function displayThumbnailImage

js/demo/demo.js:69–84  ·  view source on GitHub ↗

* Displays the thumbnal image * * @param {*} node jQuery node * @param {string} thumbnail Thumbnail URL * @param {object} [options] Options object

(node, thumbnail, options)

Source from the content-addressed store, hash-verified

67 * @param {object} [options] Options object
68 */
69 function displayThumbnailImage(node, thumbnail, options) {
70 if (thumbnail) {
71 var link = $('<a></a>')
72 .attr('href', loadImage.createObjectURL(thumbnail))
73 .attr('download', 'thumbnail.jpg')
74 .appendTo(node)
75 loadImage(
76 thumbnail,
77 function (img) {
78 link.append(img)
79 node.show()
80 },
81 options
82 )
83 }
84 }
85
86 /**
87 * Displays metadata

Callers 1

displayMetaDataFunction · 0.85

Calls 1

loadImageFunction · 0.85

Tested by

no test coverage detected