Way to convert image straight from URL to base64 without saving as a file in Python
Using the requests library:
import base64
import requests
def get_as_base64(url):
return base64.b64encode(requests.get(url).content)
Using the requests library:
import base64
import requests
def get_as_base64(url):
return base64.b64encode(requests.get(url).content)