Im trying send_media_group photo by url. In documentation says that i can use HTTP links, but gives an error message:
pyrogram.errors.exceptions.bad_request_400.MediaInvalid: Telegram says: [400 MEDIA_INVALID] - The media is invalid (caused by "messages.UploadMedia")
When I try to send as file, everything works. Of course, I can first download and then send as a file. But it will slow down the sending speed.
Code:
url = https://photo.jpg
await app.send_media_group(
msg.chat.id,
[
InputMediaPhoto(url)
]
)
2
Answers
The image at the link given may be too large. Telegram doesn’t fetch media larger than 10 MB and you’ll have to download then upload yourself.
I have Used your code and Uploaded a Image from the URL,
It would be Better if you Provide the url of Image your trying to Upload