Look up ImageMagick - a command line driven image conversion tool. You should be able to set up a script/batch job to do bulk groups of pictures.
Yep, ImageMagick is The Tool for mass image manipulation.
I converted 85,000 images with it in one evening. Started the Mogrify command and came back in the morning and the task was finished. Flawless. BUT, NEVER operate on the original copy of the image. ALWAYS have a backup file.
THE BEST TOOL for batch conversion.
Used it for years while I ran the catalog department for a large privately held wholesale distributor. Created both print and web image for them. And created a 3000+ page catalog and more large promotions than you can imagine.
Database publishing.