Crop and resize images on the fly
From the SIR site, here is a description of the script:
The major advantage of this script is that it allows me to resize and crop any image on my website without touching the actual image or writing any code. I upload each image once at a high enough resolution and can then reuse it at any size I want, anywhere I want. It doesn’t matter if the images are in a post, on a page, or in a template file–it just works.
Two simple steps:
- Upload SIR according to the instructions on their page
- Install and activate upm_image
On your textpattern form or page, use the following code:
<txp:upm_article_image form="myImage" />
Create a form called “myImage” and in that form write:
<img src="/image.php?width=390&quality=95&image=<txp:upm_img_full_url />" alt="<txp:upm_img_alt />" />
Additional parameters/options can be found on the SIR page.
Source for the tip is here on the Textpattern forum.