Thanks for the reply.
Returning image as bytes and changing the "Content-Type" header sounds a good approach. To my understanding, for every REST operation, the client must specify the output format as say f=json or f=html or f=pjson and I believe the SOE REST request handler only support these three formats for now.
So my concern is the requested output format can be either json/pjson/html even though my operation tries to send the image bytes with proper "Content-Type" header. Isn't it misleading?
Correct me if I am missing something in here?