Calling Controller Action in src of <img>

Viewed 2264

In my cshtml page I have <img src="/controllerName/actionName" /> and that works perfectly while I am testing.. but once I publish the img is broken. How can I keep the image when I publish? My action that I am calling in the src of the image returns return File(key.ToWebImage().GetBytes(), "image/jpeg");

Is there another way so that when I publish, the image sticks?

Any help is appreciated.

1 Answers
Related