Get a random photo from all albums in a folder?

bartman01bartman01 Registered Users Posts: 33 Big grins
edited May 4, 2016 in SmugMug Support
Is there any way to get a random picture from all albums in a folder? I have a folder with all family events in it, and each event is a separate album. I would like to display a couple of random photos from any of the albums in that folder but the only information I can find on pulling a random image is by individual album.

Thanks.

Comments

  • denisegoldbergdenisegoldberg Administrators Posts: 14,220 moderator
    edited April 25, 2016
    bartman01 wrote: »
    Is there any way to get a random picture from all albums in a folder? I have a folder with all family events in it, and each event is a separate album. I would like to display a couple of random photos from any of the albums in that folder but the only information I can find on pulling a random image is by individual album.
    The only way I'm aware of to generate a random photo is by using the code in the thread Random photo from gallery. That will pull a random photo from a single gallery.

    If you want to pull a random photo using more than one gallery as source you should be able to create a smart gallery that includes photos from multiple galleries, then use the random photo code against the smart gallery.

    --- Denise
  • bartman01bartman01 Registered Users Posts: 33 Big grins
    edited April 25, 2016
    If you want to pull a random photo using more than one gallery as source you should be able to create a smart gallery that includes photos from multiple galleries, then use the random photo code against the smart gallery.

    Thanks. A little extra work to maintain the smart gallery as I add new albums but that should work.
  • bartman01bartman01 Registered Users Posts: 33 Big grins
    edited April 25, 2016
    Quickly ran in to an issue using smart galleries, there is a limit of 5 rules and you can only select one gallery at a time. No way to make a smart gallery that only includes those files using the gallery based rules.
  • zbreezezbreeze Registered Users Posts: 25 Big grins
    edited May 4, 2016
    You could add a keyword to each picture you want to include in the folder and use a smart gallery -- but then you run into the limit of the maximum pictures in a smart gallery (1000).
Sign In or Register to comment.