I am developing an image generation bot for chat (for example, chat.stackexchange.com).
I can generate the image correctly, but when it comes to posting the image, I have no idea how to upload the image into chat via Python. Is there an API or some "hack" to upload the image from filesystem to i.sstatic.net
without using any side sites (imgBB, Imgur, etc.)?
/upload/image
. Here is another implementation (in Java) apart from the one in Go @rene mentioned. See also this closely related question./upload/image
allows uploading in two ways: by giving a direct link to the image or by sending the image file itself. I've successfully uploaded images using the first method in Python, but I can't make my script to work with the second one.