title: Rendering a Base64 PNG with Express
body: <p>My Node.js server has something that looks like the following:</p>
  
  <pre><code>app.get("/api/id/:w", function(req, res) {
      var data = getIcon(req.params.w);
  });
  </code></pre>
  
  <p>Here, <code>data</code> is a string containing a Base64 representation of a PNG image. Is there any way I can send this to a client accessing the route encoded and displayed as an image (e.g. so the URL can be used in an <code>img</code> tag)?</p>