This is a small contribution which simply verifies that the width and height of a newly uploaded image is within acceptable boundries.
If not, the image is resized to within the boundries, maintaining the aspect ratio using simple calculations, and resaved over the uploaded file.
This will not expand images which are below the boundries due to pixelation which will occur upon expansion of small images.
- Simple 1 step install.
- Saves space on webserver.
- Ensures that pages which display product images do not have an un-neccessarily long loading time on slower or overtaxed internet connections.