[Neos] Lelesys.Plugin.SlideShow crop Images

Bastian Waidelich bastian at typo3.org
Thu Mar 19 16:31:03 CET 2015

On 19.03.15, at 15:51, Andrew Omelyanchuk wrote:

Hi Andrew,

> [...] i want to use <media:image image="{image}" alt="test" title="test"
> maximumWidth="280" maximumHeight="195" allowCropping="TRUE" />
> but i have error
> Cannot cast object of type "TYPO3\Media\Domain\Model\ImageVariant" to
> string.

It seems you didn't import the "media" namespace. So Fluid does not 
resolve <media:.. /> to the corresponding ViewHelper and tries to render 
{image} instead.

Just add
{namespace media=TYPO3\Media\ViewHelpers}
to the top of your template.

FYI: With the upcoming version of Neos Fluid 3.0 is included and that 
will throw a more meaningful exception. Besides it allows you to use 3rd 
party ViewHelpers directly w/o having to import the namespace - if you 
use the package key:

<typo3.media:image ... />

Bastian Waidelich

More information about the Neos mailing list