title: return an image using ASP.NET Web API and display it?
body: <h2>web api action :</h2>
  <pre><code>byte[] bytes = System.IO.File
                          .ReadAllBytes(
                            HttpContext.Current.Server.MapPath(&quot;~/Images/orderedList1.png&quot;));
  var result_ = new HttpResponseMessage(HttpStatusCode.OK);
  result_.Content = new ByteArrayContent(bytes);
  result_.Content.Headers.ContentType = new MediaTypeHeaderValue(&quot;image/png&quot;);
  return result_;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/vMjHH.png" rel="nofollow noreferrer">Ajax call</a>
  <a href="https://i.stack.imgur.com/vMjHH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vMjHH.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/lFGhG.png" rel="nofollow noreferrer">respond - data in console</a>
  <a href="https://i.stack.imgur.com/lFGhG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lFGhG.png" alt="enter image description here" /></a></p>