We have a simple ViewModel. The ImageViewModel class has ImageBytes as property of type byte array. This property is set with bytes from database and the ViewModel object is passed to the view.Controller :

The above action method created an object of ImageViewModel class. We are calling a service class method which interacts with database and fetces the image bytes. We have hard coded the ImageId as 1. The object containing image bytes is sent to the view.Service class:

We are calling an Action from the view which returns a FileContentResult which is source for image tag. The image rendered using this way takes some time to load as compare to way 1 as the request to DB for getting bytes goes after the image tag is rendered.
So these are the two ways explained to render the image from byte array in MVC3 Razor.