If you use joomgallery module to display random images uploaded by your users, you can easily display the author's name (that's in the module's options). But it appears in plain text. If you want to have it as a link to their profile, here is how.

Option 1: Use the JoomDisplayCBName plugin. It's actually the easiest and most complete way to do it... But I didn't know about it until after I had tweaked the php code. So I leave the 2nd option below, just in case.

Option 2: In components/com_joomgallery/interface.php, comment out the line which says

$output .= " <li>".JText::sprintf('COM_JOOMGALLERY_COMMON_AUTHOR_VAR', $authorowner);

And replace it by

$lienauteur = "<a href=\"index.php?option=com_comprofiler&task=userprofile&user=$obj->owner\"> $authorowner </a>";
$output .= "  <li>".JText::sprintf('COM_JOOMGALLERY_COMMON_AUTHOR_VAR', $lienauteur);

Of course the href url should be adapted if you use another user manager than community builder.