Can I create a Controller that simply returns an image asset?
I would like to route this logic through a controller, whenever a URL such as the following is requeste
Yes you can return Image
public ActionResult GetImage(string imageFileName) { var path = Path.Combine(Server.MapPath("/Images"), imageFileName + ".jpg"); return base.File(path, "image/jpeg"); }
(Please don't forget to mark this as answer)