title: How do i access an image from the node.js sharp module buffer
body: <p>I'm new to node.js and web development and have a question regarding the node.js sharp module. I want to resize/crop an image using the node.js sharp module, store it to a buffer and access it afterwards. 
  After reading the <a href="http://sharp.dimens.io/en/stable/api-output/#tobuffer" rel="nofollow noreferrer">Sharp API</a> I came up with this code example.</p>
  
  <pre><code>sharp('img.jpg').extract(extract).resize(height, width).toBuffer(function (err, data, info) {img = data;});
  </code></pre>
  
  <p>I thought that the variable img now contains my new image.
  My first question would be whether my assumption is correct.
  If this is correct, how can i display the new image on my website? If possible, I would like to use an HTML img tag. But if there are better and easier ways, feel free to let me know. I don't want to store the image to a local file.</p>
  
  <p>Thanks for your help!</p>