Do you have Google Photos? If you're signed into this, normally downloads your photos. Or One drive Maybe try looking in my files under images. You may have already looked. Is there nothing in the Antivirus app where it can backup data or recover data Most unusual to Wipe the gallery of images.
I take it you're using some sort of clean up facility within Avast and that it didn't actually think your photos were infected. If it's the latter then maybe they are still in some quarantine folder within Avast and can be recovered. If it's the former and you've used the inbuilt cleaner then you may have lost them forever, unless as Glenntech has mentioned you have a backup in Google Photos or a cloud app like Google Drive, One Drive, Dropbox etc.
I do use Google Photos but it seems to have only saved photos from WhatsApp or similar apps. None of my camera photos or older albums are saved there for some reason (maybe my back up was set up wrongly). I had a look under My Files and even enabled "Hidden System Files" but sadly it hasn't turned anything up. I can't find any recovery function in the Avast apps.
It's extremely frustrating and really saddening that it's wiped my gallery like that. I cannot even begin to imagine why it would have done so.
Yeah I used Avast and ran an optimisation scan but not a deep clean or anything like that. The Apps don't seem to have any form of quarantine folder which is even more frustrating. I'm thinking that I may have potentially lost all of my photos for good as it even seems like Google Photos hasn't saved all of my camera gallery either.
I had seen someone comment about clearing the Samsung Gallery Cache and restarting the device but this didn't help either.