import base64


def convert_to_base64(image_file):
    """Open image and convert it to base64"""
    print('Converting Image to Base64')
    with open(image_file, 'rb') as f:
        return base64.b64encode(f.read()).decode('utf-8')