'How to send a photo with .webp extension via telegram bot

When I try to send such a photo, I get an error:

example: bot.send_photo(message.chat.id, photo=test.webp)

but i use links (hope it doesn't affect)

ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error code: 400. Description: Bad Request: wrong type of the web page content"


Solution 1:[1]

You have to specify the proper path of the file.

photo_url <- "https://www.gstatic.com/webp/gallery/1.webp"
bot.send_photo(message.chat.id, photo=photo_url)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Bijesh Singha