There is also the raspi2png option where you could probably figure out some way to make a script that recognises the rom you are playing and then when you take a screenshot with raspi2png it automatically names the created png the same as your rom name, then as above you can run sselphs scraper to link all your images.
Lots of ways of doing it. of course retroarch also has a screenshot function as well.
Also as a correction there are no quotation marks in the syntax for
-img_format=”png” even though there are in the help docs for his scraper.