title: Good way to retrieve images stored as bytes array in the db using ASP.NET MVC4?
body: <p>I'm programming an ASP.NET MVC4 application which stores uploaded images as <code>byte[]</code> in a database (with Entity framework) and then displays them. To display the images I'm using this code in the view:</p>
  
  <pre><code>&lt;img src="data:image;base64,@System.Convert.ToBase64String(item.ImageByte)" alt=""/&gt;
  </code></pre>
  
  <p>But each time I refresh the page I see that the browser does not cache the image and just renders it again causing unecessary bandwith usage.</p>
  
  <p>Maybe there's a more bandwith friendlier way to display the image?
  Maybe the idea to store uploaded image as 'byte[]' was stupid in the first place (my application is just a simple web page which stores articles about psychology :D with an admin panel to achieve this) and I should just store images in a folder?</p>
  
  <p>Thanks</p>