Skip to main content

PhotoSize

This object represents one size of a photo or a file / sticker thumbnail.

📝 Schema

FieldTypeDescription
file_idStringIdentifier for this file, which can be used to download or reuse the file
file_unique_idStringUnique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.
widthIntegerPhoto width
heightIntegerPhoto height
file_sizeIntegerOptional. File size in bytes

⚙️ Get methods

getFileId()

Retrieves the identifier for this file, which can be used to download or reuse the file.

$photoSizeFileId = $photoSizeObject->getFileId();

getFileUniqueId()

Retrieves the unique identifier for this file, which remains constant over time and across different bots.

$photoSizeFileUniqueId = $photoSizeObject->getFileUniqueId();

getWidth()

Retrieves the width of the photo.

$photoSizeWidth = $photoSizeObject->getWidth();

getHeight()

Retrieves the height of the photo.

$photoSizeHeight = $photoSizeObject->getHeight();

getFileSize()

Retrieves the file size in bytes, if available.

$photoSizeFileSize = $photoSizeObject->getFileSize();

➕ More

tip

For further information, refer to the official Bale documentation for more details.