def send_img(to, img):
    """
    @brief      send image to user or gourp
    @param      to: String, user id or group id
    @param      img: String, image file name
    """
    img_path = os.path.join(app.config['UPLOAD_FOLDER'], img)
    return jsonify({'ret': 0 if wechat.send_img(to, img_path) else 1})

    @brief      send image to user or gourp
    @param      to: String, user id or group id
    @param      img: String, image file name
    
wxbot_project_py2.7/weixin_bot.py