[Neos] Image content node and animated gifs?
lr at pripple.de
Fri Jun 13 23:10:17 CEST 2014
I am justing taking my first steps with Neos, and this is my first attempt to answer someone else's questions. So I hope I am not missing the point of your question entirely.
In what follows, I am assuming you have a Node represented by node which has a property of type TYPO3\Media\Domain\Model\ImageVariant, called image.
In the fluid template, you can access the image rendered by Neos via the TypoScript object path node.properties.image and the original image -- as you have already alluded to (talking of the "original" file) -- at node.properties.image.originalImage.
If you wanted the standard Image NodeTypes to use the original image (that might be confusing, as the system wouldn't respect the given dimensions in the node properties anymore), you'd have to override the corresponding prototypes defined in /Packages/Application/TYPO3.Neos.NodeTypes/Resources/Private/TypoScript/Root.ts2 by specifying a custom template modifying the partial from /Packages/Application/TYPO3.Neos.NodeTypes/Resources/Private/Templates/NodeTypes/Partials/Image.html. You could even check via the f:if view helper if node.resource.fileExtension is "gif" and only then use the original image.
In your situation, however, I'd probably rather define a new NodeType (as described in http://docs.typo3.org/neos/TYPO3NeosDocumentation/IntegratorsCookbook/CreatingContentElement.html) if I hadn't already.
Kind regards from Bavaria,
More information about the Neos