title: How to display an image tag with the ejs template engine for node js?
body: <p>Some background info: i am working with node.js with the express framework and with mongo and passport.js</p>
  
  <p>So basically i was able to login to my app with the FB login and retrieve some info like username, token, id, displayName and photos. Then this data is saved in to my DB (mongo).</p>
  
  <p>I can read all of the data out in my view with the ejs syntax except for the image.</p>
  
  <p>in my view i have the following code for the image:</p>
  
  <pre><code>&lt;%= user.facebook.profilePic %&gt;
  </code></pre>
  
  <p>this returns the following output:</p>
  
  <pre><code>https://graph.facebook.com/Grace Yip/picture?type=large
  </code></pre>
  
  <p>but when i surf to this url in the browser i get the following error message</p>
  
  <pre><code>error: {
        message: "(#803) Some of the aliases you requested do not exist: Grace      Yip",
        type: "OAuthException",
        code: 803
  }
  </code></pre>
  
  <p>I tried putting the output of my data in an image tag like so:</p>
  
  <pre><code>&lt;%= img_tag( user.facebook.profilePic ) %&gt;
  </code></pre>
  
  <p>but then i get an error saying: Error: Failed to lookup view "error" in views directory "/Users/Grace/Desktop/QA/views".</p>
  
  <p>When i remove the img_tag code the view works again.</p>
  
  <p>Any idea how i can show the picture ... I am at a loss.</p>
  
  <p>Thanks in advance!</p>
  
  <p>Greetings,</p>
  
  <p>Grace</p>