Convert image to base64.