Compress images when upload

Hi all! I’am using System\Models\File for storage images. How i can compress images when upload them?

“october/rain”: “v2.2.34”,
“laravel/framework”: “6.20.44”,
“october/all”: “v2.2.0”,

Thanks in advance.