// Load Joomla's image helper JLoader::register('JImage', JPATH_LIBRARIES . '/cms/image/image.php'); // Get the path to the logo image $logoPath = JUri::root() . OCP\Util::imagePath('/images/mylogo.png'); // Output the logo image to the page echo '';
// Get the user's avatar path from the database $userAvatar = getUserAvatar($userId); // Get the full URL to the user's avatar image $userAvatarPath = OCP\Util::imagePath('/avatars/' . $userAvatar); // Output the user's avatar image to the page echo '';In this example, we're using a custom PHP application to display user avatars. We're using the OCP Util imagePath method to generate the full URL to the user's avatar image, based on its relative path in the /avatars directory. Package/library: ownCloud.