It can already be done with sselph’s scraper. I don’t think the retropie included version can do it. You’ll have to download it, change to your required rom directory to start scraping and use a command like :-
scraper -img_format=”png” -add_not_found=true -download_images=false
This will use your own screenshots (make sure they are named the same as your roms with -image added to the end in an images folder inside your rom folder).
It will create the gamelist.xml linking all your roms to the screenshots.