class ThumbnailViewHelper extends AbstractViewHelper (View source)

Renders the src path of a thumbnail image of a given Neos.Media asset instance

= Examples =

{neos.media:uri.thumbnail(asset: assetObject)}

<output>
(depending on the asset)
_Resources/Persistent/b29[...]95d.jpeg
</output>

<code title="Rendering an asset thumbnail path with scaling at a given width only">
{neos.media:uri.thumbnail(asset: assetObject, maximumWidth: 80)}
(depending on the asset; has scaled keeping the aspect ratio) _Resources/Persistent/b29[...]95d.jpeg

Properties

protected ResourceManager $resourceManager
protected ThumbnailService $thumbnailService
protected AssetService $assetService

Methods

void
initializeArguments()

No description

string
render()

Renders the path to a thumbnail image, created from a given asset.

Details

void initializeArguments()

No description

Return Value

void

Exceptions

Exception

string render()

Renders the path to a thumbnail image, created from a given asset.

Return Value

string

the relative thumbnail path, to be used as src attribute for tags

Exceptions

MissingActionNameException
AssetServiceException
ThumbnailServiceException