src/Contao/View/Contao2BackendView/Widget/FileTree.php
private function generateGalleryImage($model, File $file, $info)
    {
        $image = $this->placeholderImage;

        if ($file->isSvgImage
            || (($file->height <= Config::get('gdMaxImgHeight')) && ($file->width <= Config::get('gdMaxImgWidth')))
        ) {
            $width  = \min($file->width, $this->thumbnailWidth);
            $height = \min($file->height, $this->thumbnailHeight);
            $image  = Image::get($model->path, $width, $height, 'center_center');
        }

        return Image::getHtml(
            $image,
            '',
            'class="gimage removable" title="' . StringUtil::specialchars($info) . '"'
        );
    }
private function generateGalleryImage($model, File $file, $info)
    {
        $image = $this->placeholderImage;

        if ($file->isSvgImage
            || (($file->height <= Config::get('gdMaxImgHeight')) && ($file->width <= Config::get('gdMaxImgWidth')))
        ) {
            $width  = \min($file->width, $this->thumbnailWidth);
            $height = \min($file->height, $this->thumbnailHeight);
            $image  = Image::get($model->path, $width, $height, 'center_center');
        }

        return Image::getHtml(
            $image,
            '',
            'class="gimage removable" title="' . StringUtil::specialchars($info) . '"'
        );
    }
private function generateGalleryImage ( $ model , File $ file , $ info ) { $ image = $ this -> placeholderImage ; if ( $ file -> isSvgImage || ( ( $ file -> height <= Config :: get ( 'gdMaxImgHeight' ) ) && ( $ file -> width <= Config :: get ( 'gdMaxImgWidth' ) ) ) ) { $ width = \ min ( $ file -> width , $ this -> thumbnailWidth ) ; $ height = \ min ( $ file -> height , $ this -> thumbnailHeight ) ; $ image = Image :: get ( $ model -> path , $ width , $ height , 'center_center' ) ; } return Image :: getHtml ( $ image , '' , 'class="gimage removable" title="' . StringUtil :: specialchars ( $ info ) . '"' ) ; }
Generate a image for use as gallery listing.

@param FilesModel $model The file model in use.
@param File       $file  The image file being rendered.
@param string      $info  The image information.

@return string
Generate a image for use as gallery listing .