Develop: Randomizing images from Gallery even the output is cached.

Hi JP, 
here the pull request to the issue #258.