/resize-images-php

A small script that resizes images in a given directory.

Primary LanguagePHP

Configuration

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.

Instructions

  1. place somewhere on your server or machine that has your images. (obviously, php needs to be installed)
  2. Execute resize.php either via terminal or browser
  3. That’s it. By default it will resize all images by 50%.

SimpleImage.php

This script leverages the class SimpleImage.php. More information about this class can be found here:
http://www.white-hat-web-design.co.uk/blog/resizing-images-with-php/