title: How can I render an image in asp.net mvc?
body: <p>I have a sample I'm building, that's using the Northwind database.
  I have a view in which I show all the products for a specifc category and use a ul to generate items with an image and the products name and price.</p>
  
  <p>I have used the code here, <a href="http://blogs.msdn.com/b/miah/archive/2008/11/13/extending-mvc-returning-an-image-from-a-controller-action.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/b/miah/archive/2008/11/13/extending-mvc-returning-an-image-from-a-controller-action.aspx</a> .</p>
  
  <p>And have gotten to the point that if I right-click an image on my page I get
  the follow for the image url.</p>
  
  <p>This is the action method I provided, which just takes the Categores ID.
  /image/show/1</p>
  
  <p>My action method in my ImageController is as follows:</p>
  
  <pre><code>    //
      // GET: /Image/Show
      public ActionResult Show(int id)
      {
          var category = northwind.AllCategories().Single(c =&gt; c.CategoryID == id);
          byte[] imageByte = category.Picture;
          string contentType = "image/jpeg";
  
          return this.Image(imageByte, contentType);
      }
  </code></pre>
  
  <p>Note: Picture is a byte[]</p>
  
  <p>I then call it in my view like this. (product is the Model for my view)</p>
  
       
  
  <p>But I still can't get the image to be displayed.</p>