title: how to display images from the ndb datastore using data URI scheme (via passing data to template and not having to make another request)
body: <p>I store a thumbnail image as a blob property of my entity. I am able to serve the images just fine as described here: <a href="https://stackoverflow.com/questions/11550362/displaying-blob-images-in-python-app-engine">Displaying Blob Images in Python (App Engine)</a> </p>
  
  <p>This however requires making another get request and fetching the image by id from the ndb. Since I already have the original entity available at the time I render the img tag with appropriate href attribute, would there exist a way to render the image inline using the <a href="http://en.wikipedia.org/wiki/Data_URI_scheme" rel="nofollow noreferrer">Data URI Scheme</a>?</p>
  
  <p>I read the documentation for google images API but there doesn't seem to be a method that would render my image to the required format to include it as a string. I also googled quite extensively but somehow everyone is suggesting the solution for rendering images from the datastore as referenced above. To my mind being able to render the images using the uri scheme would not only save datastore get requests (would most likely be fetched from memcache but still) but most importantly would save visitors of my page a round trip across the ocean which would speed up the serving of the page quite considerably.</p>
  
  <p>Many thanks for all your help!</p>