Neos\Media\Domain\Model\Asset::getThumbnail PHP Метод

getThumbnail() публичный Метод

If the maximum width / height is not specified or exceeds the original asset's dimensions, the width / height of the original asset is used.
public getThumbnail ( integer $maximumWidth = null, integer $maximumHeight = null, string $ratioMode = ImageInterface::RATIOMODE_INSET, boolean $allowUpScaling = null ) : Thumbnail
$maximumWidth integer The thumbnail's maximum width in pixels
$maximumHeight integer The thumbnail's maximum height in pixels
$ratioMode string Whether the resulting image should be cropped if both edge's sizes are supplied that would hurt the aspect ratio
$allowUpScaling boolean Whether the resulting image should be upscaled
Результат Thumbnail
    public function getThumbnail($maximumWidth = null, $maximumHeight = null, $ratioMode = ImageInterface::RATIOMODE_INSET, $allowUpScaling = null)
    {
        $thumbnailConfiguration = new ThumbnailConfiguration(null, $maximumWidth, null, $maximumHeight, $ratioMode === ImageInterface::RATIOMODE_OUTBOUND, $allowUpScaling);
        return $this->thumbnailService->getThumbnail($this, $thumbnailConfiguration);
    }