Return an Image from a WebAPI Controller in C# 28-12-2015 16:44:12 C# / ASP.NET MVC 0 Bookmark(s) 410 View(s) public HttpResponseMessage GetPicture(string id) { var pictureBytes = _employeeService.GetPictureByEmployeeId(id); var response = new HttpResponseMessage(); if (pictureBytes == null) { response.StatusCode = HttpStatusCode.NotFound; } else { response.Content = new ByteArrayContent(pictureBytes), response.Content.Headers.ContentType = new MediaTypeHeaderValue("image/jpeg"); } return response; }