sendPhoto - mkotb/Telegram-Errors GitHub Wiki
If not provided, Telegram will return there is no photo in the request
If an invalid file id is sent, Telegram will return Wrong persistent file_id specified: contains wrong characters or has wrong length.
This means either the string is invalid or the id doesn't exist on their servers.
If the file name does not match the valid extensions, Telegram will return Photo has unsupported extension. Use one of .jpg, .jpeg, .gif, .png, .tif or .bmp
If the extension matches and the file isn't a valid image, Telegram will return IMAGE_PROCESS_FAILED