Encoding binary data in flask/jinja2,entry['image'] = entry['image'].encode('base64')