Front page images just for friends

By docobo

Hi,

I have created a custom index page with most recent images on my site using the tidypics function: 

if (elgg_is_active_plugin('tidypics')) {
$latest_photos = tp_get_latest_photos(6);
$latest_images .= elgg_view('output/url', array('href' => "/photos/siteimagesall",
'text' => elgg_echo('link:view:all'),
'is_trusted' => true,
));
echo elgg_view_module('featured', elgg_echo("tidypics:mostrecent"), $latest_photos, $mod_params);
}

 

However, this shows the most recent images uploaded on the whole site,and I only want it to show the most recent images uploaded by the user or their friends. 

Any help would be much appreciated?