in reply to Randomizing "statically" on a daily/weekly basis

Write a daemon (or cronjob) that randomizes the image once per hour or something. Let's assume that your CGI script looks for the image in the file foo.jpeg. Then your daemon would write the new image to foo.jpeg.tmp, and when it's finished, it issues rename("foo.jpeg.tmp", "foo.jpeg"), overwriting the old image. If you use Unix, this works without locking, because the rename(2) call is atomic and there is no time where a CGI program would find a half-ready image or something like this.