There are a handful of variables at the top of the script that allow you to change functionality
$prefix: allows you to change the prefix on the newly created images.
$directory: allows you to select the path of the directory where the images are held.
$exts: list of acceptable extensions for images.
$scale: Determines what % the original image will scale down to.
- place somewhere on your server or machine that has your images. (obviously, php needs to be installed)
- Execute resize.php either via terminal or browser
- That’s it. By default it will resize all images by 50%.
This script leverages the class SimpleImage.php. More information about this class can be found here: