IT Web Development Help Pages
Using randomimage.cgiPrint this page
Questions should be directed to Web Development, firstname.lastname@example.org
Use this program to display a different image on a web page every time the page is loaded.
Note: All images MUST be jpg image format and MUST have the suffix ".jpg" (NOT ".jpeg"). The file names themselves can be anything. It is recommended that the files used all have the same dimensions (same height and width). Otherwise, the web page layout may become distorted as each image is loaded.
Create a subdirectory within your department web directory in which to store the image files. The department web directory and images must be on the main UD web server (copland or mahler). You cannot call images that exist on a departmental server.
Copy your images into the directory you just created.
In your web page HTML, use the following statement in the image location:
PATH_TO_IMAGESwith the path to the directory containing your images. Add height and width attributes and a generic alt tag for good measure. For example, if your images are in the directory
/www/htdocs/registrar/images/fall/, your image tag would read
<img src="http://www.udel.edu/cgi-bin/randomImage?dir=/www/htdocs/registrar/images/fall/" width="100" height="150" alt="Fall photo">
View the source of the UD Home Page for an example of this technique.