Starting point (doing it manually):.
After installing ImageMagick software sudo apt-get install imagemagick -y on a Debian-based distro, you can just use Terminal and your file manager.
Put some image files in a folder. Open Terminal in that folder. Use 'magick convert' (which belongs to the ImageMagick software you installed) to resize, rename, and reformat the image files.
I placed 5 pngs into ~/Desktop/ImageFrom, altogether they weight 2mb. (I also have a folder desktop/ImageTo.) I open Terminal in ~/Desktop/ImageFrom and do mogrify:
mogrify -path ~/Desktop/ImageTo -format jpg -resize 1000x1000 *
This puts versions of all my pngs into my other folder, but they are now jpegs with the longest edge being 500px. They now weigh 225kb altogether.
Here ends the 'Starting point' part.