(experimental) Image resizer - WebsiteBaker

This experiment uses a small droplet to scan the page output and replace all <img src="... links with a call to the image resizer script.
The script will resize the image to the width given in the html output. The resized image will also be cached, so any next request for the same image will use the cached version.

Only images in the /media/ directories are being replaced, and also only when a width is set.
This way images used in the template directory and images used with most image galleries will not be affected by this script.
Images with the correct size are not resized, but they will be sent through the resizer script.

Demo

2 pages, with both the same (large) image included and resized in the wysiwyg editor to 500px width.

Page without imageresizer | Page with imageresizer

View the Droplet and download the current script