Answer the question
In order to leave comments, you need to log in
Telegram API, throw a picture with a link, but don't show the link, how?
Is it possible to throw a picture with a link, for example
https://pp.userapi.com/c841220/v841220591/667c8/16VMgxEjb94.jpg
Answer the question
In order to leave comments, you need to log in
Just wrap the image in a tag <a>
and add ​
it as text. Then the picture will be sent without a visible link:
bot.send_message(id, '<a href="IMG_URL">​</a>', parse_mode="HTML")
Solution to your problem: instead of send_message send_photo
bot.send_photo(message.chat.id, 'https://pp.userapi.com/c841220/v841220591/667c8/16VMgxEjb94.jpg')
Заверни картинку в ссылку . И отправляй как текст с параметром parse_mode = "HTML".
text ='<a href="https://pp.userapi.com/c841220/v841220591/667c8/16VMgxEjb94.jpg" >Любое название </a>'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question