Neos.Media.Browser/Classes/ViewHelpers/ThumbnailViewHelper.php
public function render(AssetProxyInterface $assetProxy = null, $width = null, $height = null)
    {
        if ($width === null || $height === null) {
            $width = 250;
            $height = 250;
        }

        if ($width <= 250 && $height <= 250) {
            $thumbnailUri = $assetProxy->getThumbnailUri();
        } else {
            $thumbnailUri = $assetProxy->getPreviewUri();
        }

        $this->tag->addAttributes([
            'width' => $width,
            'height' => $height,
            'src' => $thumbnailUri
        ]);

        return $this->tag->render();
    }
public function render(AssetProxyInterface $assetProxy = null, $width = null, $height = null)
    {
        if ($width === null || $height === null) {
            $width = 250;
            $height = 250;
        }

        if ($width <= 250 && $height <= 250) {
            $thumbnailUri = $assetProxy->getThumbnailUri();
        } else {
            $thumbnailUri = $assetProxy->getPreviewUri();
        }

        $this->tag->addAttributes([
            'width' => $width,
            'height' => $height,
            'src' => $thumbnailUri
        ]);

        return $this->tag->render();
    }
public function render ( AssetProxyInterface $ assetProxy = null , $ width = null , $ height = null ) { if ( $ width === null || $ height === null ) { $ width = 250 ; $ height = 250 ; } if ( $ width <= 250 && $ height <= 250 ) { $ thumbnailUri = $ assetProxy -> getThumbnailUri ( ) ; } else { $ thumbnailUri = $ assetProxy -> getPreviewUri ( ) ; } $ this -> tag -> addAttributes ( [ 'width' => $ width , 'height' => $ height , 'src' => $ thumbnailUri ] ) ; return $ this -> tag -> render ( ) ; }
Renders an HTML img tag with a thumbnail or preview image, created from a given asset proxy.

@param AssetProxyInterface $assetProxy The asset to be rendered as a thumbnail
@param integer $width Desired width of the thumbnail
@param integer $height Desired height of the thumbnail
@return string an <img...> html tag
Renders an HTML img tag with a thumbnail or preview image created from a given asset proxy .