I have a database of ready made images to upload to a twitter page, but can't seem to figure out a way around saving the images to my local machine first.
The pictures will be uploaded by a bot running on Heroku, which is pulling the code from Github, so saving and deleting images would mean constant commits etc right?
Is it possible to upload the image directly as bytes (pre saved as a .png) and skip this? or is there another possible workaround?
working with python 3.8 and currently using tweepy, although the module is irrelevant if I can upload images without saving.
There are no workarounds. You'll have to write the bytes to an actual .png file before you can upload it to the Twitter API.
Upload/Post an image to Twitter direct from MySQL database (blob/byte format) without saving image in Python