Upload images via FTP and automatically compress them

I am trying to create a tool to compress images. The images will be uploaded through FTP.

There is a way to import the images automatically to the Media library and trigger a bulk smush?