I need to return an image with a Web API Get method. The code below seems to work fine except that I get this message in the Fiddler\'s ImageView window, \"This response is
In addition to previous answers, use this to get image based on hosting environment within System.Web.Hosting namespace.
var imageUrl = HostingEnvironment.MapPath("~/images/photo.png");
and use imageUrl it to find byte[] of the image, and process with proper content-type like image/jpeg
byte[] binaryImage = File.ReadAllBytes(imageUrl);
return File(binaryImage , "image/jpeg");
Make sure you have referenced System.IO namespace for File static method.