cloudinary
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -16,5 +16,22 @@ require('coffee-script/register'); | ||
source = exports.utils.url(source, options); | ||
if ("html_width" in options) options["width"] = exports.utils.option_consume(options, "html_width") | ||
if ("html_height" in options) options["height"] = exports.utils.option_consume(options, "html_height") | ||
return "<img src='" + source + "' " + exports.utils.html_attrs(options) + "/>"; | ||
if ("html_width" in options) options["width"] = exports.utils.option_consume(options, "html_width"); | ||
if ("html_height" in options) options["height"] = exports.utils.option_consume(options, "html_height"); | ||
var responsive = exports.utils.option_consume(options, "responsive"); | ||
var hidpi = exports.utils.option_consume(options, "hidpi"); | ||
if (responsive || hidpi) { | ||
options["data-src"] = source; | ||
classes = [responsive ? "cld-responsive" : "cld-hidpi"]; | ||
current_class = exports.utils.option_consume(options, "class"); | ||
if (current_class) classes.push(current_class); | ||
options["class"] = classes.join(" "); | ||
source = exports.utils.option_consume(options, "responsive_placeholder", exports.config().responsive_placeholder); | ||
if (source == "blank") { | ||
source = exports.BLANK; | ||
} | ||
} | ||
html = "<img "; | ||
if (source) html += "src='" + source + "' "; | ||
html += exports.utils.html_attrs(options) + "/>"; | ||
return html; | ||
} | ||
@@ -26,1 +43,2 @@ exports.cloudinary_js_config = exports.utils.cloudinary_js_config; | ||
exports.SHARED_CDN = exports.utils.SHARED_CDN; | ||
exports.BLANK = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; |
@@ -5,3 +5,3 @@ { | ||
"description": "Cloudinary NPM for node.js integration", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"homepage": "http://cloudinary.com", | ||
@@ -8,0 +8,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
127263
38