This question already has an answer here:
Can't receive images from my telegram bot, trying something like this:
import telegram
from telegram.ext import Updater
from telegram.ext import MessageHandler
from telegram.ext import Filters
def photo_handler(bot, update):
file = bot.getFile(update.message.photo.file_id)
print ("file_id: " + str(update.message.photo.file_id))
file.download('photo.jpg')
updater = Updater(token='my token')
dispatcher = updater.dispatcher
dispatcher.add_handler(MessageHandler(Filters.photo, photo_handler))
No any errors while running
I've used this to send images generated by matplotlib. You can adapt it to your needs.