I need to load an image that's uploaded to the public folder from within a module
In the module itself:
function mymodule_dashboard() {
GLOBAL $user;
$profile = profile2_load_by_user($user->uid, 'personal_information');
$data['avatar'] = $profile->field_picture['und'][0]['uri'];
In my dashboard.tpl.php:
<img src="<?php echo $data['avatar']; ?>" />
The rendered content:
<img src="public://image.jpg">
I can pull the image name and build the path myself, but I'm looking for a way to actually take advantage of this public folder business