This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import base64 | |
import os | |
import pathlib | |
from urllib.parse import urlparse | |
# list of supported image mime-types | |
# Special thanks to https://gist.github.com/FurloSK/0477e01024f701db42341fc3223a5d8c | |
# Special mention, and thanks to MDN | |
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types |