c# - How do I return an image from a ServiceStack query? -
i've got solution works, although suspect there more efficient way this... end result photo of subject displayed on web page. that, have servicestack service returns byte array, feed httphandler takes byte array , turns image. way can set src of image http://www.mydomain.com/httphandler.ascx?id , image of specific person displayed. hoping bypass httphandler , use servicestack return image web page. can't find examples of this, believe read possible servicestack. possible? the docs on service return types shows how return image responses, techniques used in servicestack's imgur.servicestack.net demo. an alternative solution industrial strength webserver nginx serve static file instead, avoiding servicestack, asp.net or managed .net code, can writing static file , redirecting it. this how can configure nginx serve static files in /img/ , add cache headers static files have common web formats file extensions (ico|pdf|flv|swf|exe|txt|css): server {