The photos and documents in the Viber are stored on the device or on the memory card rather Viber makes its own backup. These are kept in the Viber media or storage.
If photos are deleted accidentally or you want to recover from your chat, then open the media files on Viber and then tap on the files you want to recover.
Moreover, you can check the backup on Google Drive or iCloud for the recovery of all photos.