title: How to display image downloaded from cloud storage in the browser?
body: <p>Currently, I download the image from my cloud storage bucket, encode it in base64 and then pass it in data uri in the <code>src</code> attribute of an <code>img</code> tag.</p>
  
  <p>Is there any other way to do this ?</p>
  
  <pre><code>router.post('/images', function(req, res, next) {
      var image = bucket.file(req.body.image);
      image.download(function(err, contents) {
          if (err) {
              console.log(err);
          } else {
              var resultImage = base64_encode(contents);
              var index = req.body.index;
              var returnObject = {
                  image: resultImage,
                  index: index
              }
              res.send(returnObject);
          }
      });
  });
  </code></pre>