$randomImage = printRandomImages(3, null,'album','vacation');
if (is_object($randomImage)) {
$randomImageURL = html_encode(getURL($randomImage));
Not really in front of a machine where I can test that out right now, but I think it'll do what you're asking. Massage and style any elements you need to make it work.