title: How to display image href from db collection as an actual image
body: <p>I using jQuery to access an image href in database collection i.e <a href="https://somesite/img/somePhoto.png" rel="nofollow noreferrer">https://somesite/img/somePhoto.png</a> and then display this in a divtag.</p>
  
  <p>I have made it to the point where I can display the text of the href, but I now want to take this a step further and actually display the image itself.</p>
  
  <p>.html(message.media) is the element I am trying to display as an image</p>
  
  <p>Here is the code so far</p>
  
  <pre><code>groupManager.prototype.displayChatMessage = function( message ){
      var _this = this;
      $('&lt;li/&gt;')
          .attr("id",message._id)
          .text(message.message) //message text
          .html(message.media) // https://somesite/img/somePhoto.png
          .prepend($("&lt;strong /&gt;").text(message.fromName+': '))
          .appendTo($('#messagesDiv'));
      $('#messagesDiv')[0].scrollTop = $('#messagesDiv')[0].scrollHeight;
  };
  </code></pre>