diff --git a/IPython/html/static/notebook/js/outputarea.js b/IPython/html/static/notebook/js/outputarea.js
index 406930e..3510332 100644
--- a/IPython/html/static/notebook/js/outputarea.js
+++ b/IPython/html/static/notebook/js/outputarea.js
@@ -603,7 +603,8 @@ var IPython = (function (IPython) {
OutputArea.prototype.append_png = function (png, md, element, type) {
var toinsert = this.create_output_subarea(md, "output_png", type);
- var img = $("").attr('src','data:image/png;base64,'+png);
+ var img = $("");
+ img[0].attr('src','data:image/png;base64,'+png);
if (md['height']) {
img[0].setAttribute('height', md['height']);
}