URL to pull a random image

SpeedieSpeedie Registered Users Posts: 173 Major grins
edited August 30, 2007 in SmugMug Support
Hi,
I've found out it's possible to pull a random image from a particular gallery with a URL, eg:
http://abcdefghijk.smugmug.com/photos/random.mg?AlbumID=99999999&Size=150x150
But what I'd really like is to pull an image selected randomly from across all galleries, is this possible?

Comments

  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited August 29, 2007
    Speedie wrote:
    Hi,
    I've found out it's possible to pull a random image from a particular gallery with a URL, eg:
    http://abcdefghijk.smugmug.com/photos/random.mg?AlbumID=99999999&Size=150x150
    
    But what I'd really like is to pull an image selected randomly from across all galleries, is this possible?

    You could use JavaScript and the API to get a list of public galleries and then use JavaScript to pick a gallery randomly and then pull a random image with a URL. Certainly, not as simple as just using a URL, but it could all be encapsulated in a single JavaScript function.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • SpeedieSpeedie Registered Users Posts: 173 Major grins
    edited August 30, 2007
    jfriend wrote:
    You could use JavaScript and the API to get a list of public galleries and then use JavaScript to pick a gallery randomly and then pull a random image with a URL. Certainly, not as simple as just using a URL, but it could all be encapsulated in a single JavaScript function.

    Thanks for your reply. Actually I meant pull a random image from my own galleries (not all public galleries). Is this still doable with a URL? What other parameters does random.mg accept?
Sign In or Register to comment.