faster/easier random image based on tag?

Hello,

I currently have my random images loop set to do the following:
- pick random image
- if random image does not have a specific tag or specific size, pick again.

Is there an easier (or faster) method of picking a random image based on tag that I am missing, such as filtering out the specific tag, then randomizing based on that? The photos I want to filter out are maybe about 5-10% of my entire collection so the loop may run for a while before it finishes, the way I have it set now.

Thanks for any input.

Comments

  • You could use the search object to get all the images with the specific tag then randomly pick out one from the list. The search engine will return an array of images. But unlike the normal album getImages(), the array returned by the search engine has two dimensions. Each element contains a folder name and an image name.
  • So, what I am doing is the most efficient way to get the image along with the description, link, and all of that? Ok, thanks then.
Sign In or Register to comment.