With this extension you can put a random image into your document without the need of storing the names in a mysql database. The code will scan your selected folder (and subfolders, if you want to) and will select one random image.
You don't have to modify the extension's parameters everytime you upload a new image: the script searches for all the images available (gif and jpg) everytime the page is executed, so you only have to upload images to the folder you selected and they will be included in the list of available images.
To use it, select: "Server Behaviors->Tecnorama->Random Image"
Q.: Can the script search in subfolders?
A.: Yes if you want to: just select the "include subfolders" option and they will be included in the search. If you want to use only the selected folder (but not the subfolders), uncheck it.
Q.: Can I use it more than once in the same document?
A.: Yes, and you can use different folders for each random image. And you can also choose if subfolders should be included for the first random image, but not for the second, if another folder should be used for the third random image....
Q.: How can I guess the dimensions for the image the script has chosen?
A.: Don't worry, the script will do it for you and it will be added to the image properties in the resulting HTML code.
The script returns something like: <img src="image.gif" width="30" height="80"> (if "image.gif" were 30 pixel wide and 80 pixel high).
Q.: What if a folder does not contain images at all?
A.: That's part of the TODO list: At least one of the folders/subfolders must contain an image. Note that it doesn't mean that all the folders/subfolders must contain one: Only one folder/subfolder with one image is enough, even if the others are empty.
See a demo here
New Version 1.0.1 (Sep,8 2003): Support for image extensions in uppercase (*.GIF, *.JPG, *.JPEG, *.PNG). Support for jpeg and png files.
You can download it here (current version: 1.0.1)