Download this repo as a zip and use Blender -> Preferences -> Addons -> Install to add the .zip as an addon.
After installing (you may need to restart Blender), saving Blender should trigger the addonto loop through each image and save it to a ./textures
folder in the .blends directory. (I think it will sometimes save to /textures
if it has trouble determining the path of the blend file: i.e. with unsaved scenes)
You may need to manually remove the folder from your Blender/addons folder