PDA

View Full Version : URL to pull a random image


Speedie
Aug-29-2007, 06:19 PM
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?

jfriend
Aug-29-2007, 06:26 PM
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.

Speedie
Aug-30-2007, 01:51 AM
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?