ContentType not supported: image/jpeg

How do I return a jpeg stream?

return new HttpResult(streamRecord, “image/jpeg”);

is failing with

ContentType not supported: image/jpeg

Please provide the full StackTrace also what type is streamRecord?

My fault, apologies. All is OK.