This PHP script resizes and does compress all png/jpg images in a folder, keeping the same aspect ratio.
For Debian 10/11: apt -y install php php-common php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath Or check this https://www.php.net/downloads.php
If all are set, then follow the below steps :
- Open Terminal
- cd Bulk-Image-Resize-PHP
- chmod -R 777 . (. means current directory)
- php resize.php
Check the resized folder which will be created automatically.
You are done !!