asp.net core display image code example
Example: asp net core image server
[HttpPost]
public ActionResult RetrieveImage()
{
Image img = db.Images.OrderByDescending
(i=>i.Id).SingleOrDefault();
string imageBase64Data =
Convert.ToBase64String(img.ImageData);
string imageDataURL =
string.Format("data:image/jpg;base64,{0}",
imageBase64Data);
ViewBag.ImageTitle = img.ImageTitle;
ViewBag.ImageDataUrl = imageDataURL;
return View("Index");
}