public function getCoverSource($size = ComPhotosDomainEntityPhoto::SIZE_SQUARE)
    {
        $cover = $this->photos->order('photoSets.ordering')->fetch();
        $filename = $cover->filename;

        //get file extension
        $extension = explode('.', $filename);
        $extension = array_pop($extension);

        //remove file extension
        $name = preg_replace('#\.[^.]*$#', '', $filename);
        $filename = $name.'_'.$size.'.'.$extension;

        return $this->owner->getPathURL('com_photos/'.$filename);
    }