One of the factors that can improve your page speed score is having properly sized images. For this reason, our Web, Cloud and cPanel hosting plans support the following image optimization tools:
optipng - Compresses PNG files without loss of information
jpegoptim - Compresses JPEG files
jpegtran - Can perform different transformations on JPEG files, such as scaling
gifsicle - Manipulates GIF images
libwebp-tools - A set of tools for WEBP image format
You can use them to optimize your images through the use of plugins. If you have a Web Premium hosting plan or greater, you can use them via SSH as well. These utilities are enabled by default when opening an SSH session, so you will be able to use them right away 😊
In case you want to execute these commands over PHP, first make sure to enable the shell_exec() function in the PHP configuration of your panel by following this guide: How to enable disabled PHP functions.