title: How to return image stream and text as JSON response from Python Flask API
body: <p>From a Python Flask API, I want to return an image stream and also some text in a single API response.</p>
  <p>Something like this:</p>
  <pre class="lang-json prettyprint-override"><code>{
    'Status' : 'Success',
    'message': message,
    'ImageBytes': imageBytes
  }
  </code></pre>
  <p>Also, I would like to know what would be the best format to use for <code>imageBytes</code>, so that the client applications (Java / JQuery) can parse and reconstruct the image.</p>
  <p>If the above approach is not correct, please suggest a better approach.</p>