Looking for a stack displaying shuffle image from warehouse folder

I have a folder with 300 to 500 pictures inside, hosted on my server.
I need to display only 1 to 6 photos on a page, but I would like them display randomly each time the page is loaded.
Do you have any idea ?

Thanks !

Total CMS can do that for you

1 Like

Check out photostream stack from instacks, I know it will do random. Not sure about display only one.

Thank you ! I will try photostream and ask developer if this is possible. CMS would be too expensive for this only need.

Finally, Photostream does not do the job I’m looking for, because it displays ALL the pictures in the folder.
My folder contains 350 to 500 images… impossible !

Any another idea ?

I put some php code in my dropbox for you (I sent you link via pm. I will leave it up there for a few days)

Put it in an html stack
Name your page .php
Change the paths - You will see comments in top of code.
Publish the page


1 Like

Thanks for helping me swilliam ! I just sent you a message.

I found this php code on a forum. Does someone know how to integrate it on a stacks page in RW ?
$imagesDir = ‘images/tips/’;

$images = glob($imagesDir . ‘*.{jpg,jpeg,png,gif}’, GLOB_BRACE);

$randomImage = $images[array_rand($images)]; // See comments

Thanks !