Upload/Post an image to Twitter direct from MySQL database (blob/byte format) without saving image in Python

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?