converts the file to base64 and sends it using the sendImage function of wapi.js
        :param path: file path
        :param chatid: chatId to be sent
        :param caption:
        :return:

def send_media(self, path, chatid, caption):
        """
            converts the file to base64 and sends it using the sendImage function of wapi.js
        :param path: file path
        :param chatid: chatId to be sent
        :param caption:
        :return:
        """
        imgBase64 = self.convert_to_base64(path)
        filename = os.path.split(path)[-1]
        return self.wapi_functions.sendImage(imgBase64, chatid, filename, caption)