import vk_api
vk = getVk(login, password)
def photoLoad(vk, group_id=айди группы):
image = open('image.png', 'rb')
url = vk.photos.getWallUploadServer(group_id=group_id)
responce = requests.post(url, files={'photo': image}).json()
responce = vk.photos.saveWallPhoto(group_id=group_id, photo=responce['photo'], server=responce['server'],
hash=responce['hash'])[0]
return f"photo{responce['owner_id']}_{responce['id']}"