Answer the question
In order to leave comments, you need to log in
I send one picture to the bot's telegram, and the bot receives 4. What's the matter?
I am writing a telegram bot in python using aiogram.
Set up taking photos by the bot.
For the sake of interest, I decided to see what the photo transferred to the bot through print(message.photo)
.
I got several slightly different instances of the same photo as output
[<aiogram.types.photo_size.PhotoSize object at 0x000001A8AA2936D0>, <aiogram.types.photo_size.PhotoSize object at 0x000001A8AA2938B0>, <aiogram.types.photo_size.PhotoSize object at 0x000001A8AA2937C0>]
Answer the question
In order to leave comments, you need to log in
Telegram stores several copies of photos in different sizes, most likely to facilitate their display in clients. If the photo is large, and you only need to display a thumbnail, then it is better to take a finished thumbnail right away than to resize the original each time.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question