To comply with the upload limits of sm.ms, I need to compress the images before uploading, and then I found a project that can handle batch processing and has a Linux build:
Github Repo not found
The embedded github repo could not be found…
It's quite useful and can basically compress more than half: