‪TYPO3CMS  11.5
TYPO3\CMS\Backend\ViewHelpers\ThumbnailViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Backend\ViewHelpers\ThumbnailViewHelper:
TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper

Public Member Functions

 initializeArguments ()
 
string render ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper
 __construct ()
 

Additional Inherited Members

- ‪Protected Attributes inherited from ‪TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper
string $tagName = 'img'
 
ImageService $imageService
 

Detailed Description

ViewHelper for the backend which generates an :html:<img> tag with the special URI to render thumbnails deferred.

Examples

Default

::

<be:thumbnail image="{file.resource}" width="{thumbnail.width}" height="{thumbnail.height}" />

Output::

<img src="/typo3/thumbnails?token=&parameters={"fileId":1,"configuration":{"_context":"Image.Preview","maxWidth":64,"maxHeight":64}}&hmac=" width="64" height="64" alt="alt set in image record" title="title set in image record"/>

Inline notation

::

{be:thumbnail(image: file.resource, maxWidth: thumbnail.width, maxHeight: thumbnail.height)}

Output::

<img src="/typo3/thumbnails?token=&parameters={"fileId":1,"configuration":{"_context":"Image.Preview","maxWidth":64,"maxHeight":64}}&hmac=" width="64" height="64" alt="alt set in image record" title="title set in image record"/>

Definition at line 60 of file ThumbnailViewHelper.php.

Member Function Documentation

◆ initializeArguments()

TYPO3\CMS\Backend\ViewHelpers\ThumbnailViewHelper::initializeArguments ( )

Initialize arguments.

Reimplemented from TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper.

Definition at line 65 of file ThumbnailViewHelper.php.

References TYPO3\CMS\Core\Resource\ProcessedFile\CONTEXT_IMAGEPREVIEW.

◆ render()

string TYPO3\CMS\Backend\ViewHelpers\ThumbnailViewHelper::render ( )

Resizes a given image (if required) and renders the respective img tag

See also
https://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Image/
Exceptions
Exception
Returns
‪string Rendered tag

Reimplemented from TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper.

Definition at line 79 of file ThumbnailViewHelper.php.

References TYPO3\CMS\Core\Imaging\ImageManipulation\CropVariantCollection\create().