[TYPO3-english] Original width and height of image in fluid

Jigal van Hemert jigal.van.hemert at typo3.org
Tue Sep 12 22:34:29 CEST 2017


On 06/09/2017 07:24, Vikram Mandal wrote:
> On 09/05/2017 12:55 PM, Jigal van Hemert wrote:
>>
>> If 'image' is the file reference object it would be
>> {image.originalFile.width}
>>
>>
>
> I am trying to get the width and height of an image in news. So I tried :
>
> {newsItem.firstFalImagePreview.originalFile.width}
>
> {newsItem.firstFalImagePreview.width}
>
> But none seems to work.
>
> newsItem.firstFalImagePreview returns
> \TYPO3\CMS\Extbase\Domain\Model\FileReference
>

Ah, the news firstFalImagePreview :-)

Looking at the code it must be 
{newsItem.firstFalImagePreview.originalResource.originalFile.width}

-- 
Jigal van Hemert
TYPO3 CMS Core Team Member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-english mailing list