src/TgCommands.php
public function chatSetPhoto($chat, $mediaUri)
    {
        $chat = $this->escapePeer($chat); //Not escapeStringArgument as chat needs underscores if spaces in name

        //Process the requested media file.
        $processedMedia = $this->processMediaUri($mediaUri);
        if ( ! $processedMedia) {
            return false;
        }

        //Send media file.
        $result = $this->exec('chat_set_photo ' . $chat . ' ' . $processedMedia['filepath']);

        //Clean up if media file came from REMOTE address
        $this->cleanUpMedia($processedMedia);

        return $result;
    }
public function chatSetPhoto($chat, $mediaUri)
    {
        $chat = $this->escapePeer($chat); //Not escapeStringArgument as chat needs underscores if spaces in name

        //Process the requested media file.
        $processedMedia = $this->processMediaUri($mediaUri);
        if ( ! $processedMedia) {
            return false;
        }

        //Send media file.
        $result = $this->exec('chat_set_photo ' . $chat . ' ' . $processedMedia['filepath']);

        //Clean up if media file came from REMOTE address
        $this->cleanUpMedia($processedMedia);

        return $result;
    }
Sets the group chat picture for specified $chat

The photo will be cropped to square

@param        $chat
@param string $mediaUri Either a URL or a local filename of the photo you wish to set
@return bool|string
@uses     exec()