Using asp.net core web api, I want to have my controller action method to return an jpeg image stream. In my current implementation, b
[HttpGet("Image/{id}")] public IActionResult Image(int id) { if(id == null){ return NotFound(); } else{ byte[] imagen = "@C:\\test\random_image.jpeg"; return File(imagen, "image/jpeg"); } }