I designed this specifically as a random picture generator, but im sure it can be used for many things. You make a directory with the pictures that you want to randomly select.
Using this funciton, you just use the directory as the aurgument and it returns the path of a random file in that directory.