public static function getImageByImageId($id = 0)
{
$db = Factory::getDBO();
$query = ' SELECT a.id, a.title, c.title as category_title' . ' FROM #__phocagallery AS a' . ' LEFT JOIN #__phocagallery_categories AS c ON c.id = a.catid' . ' WHERE a.id = ' . (int) $id . ' GROUP BY a.id, a.title, c.title' . ' ORDER BY a.id' . ' LIMIT 1';
$db->setQuery($query);
$image = $db->loadObject();
return $image;
}