Closed felixvosswork closed 2 years ago
If you use image: file
you don't specify treatIdAsReference: 1
, because image is not an uid, but a reference.
You can get the original image width and height from file.properties.width
and file.properties.height
.
Thank you for the fast reply. How can i get the cropped image width and height?
This is not so easy, because normally it is added automatically with f:image, but if you use f:uri.image you only get the path to the already processed file. You would need to work around that with a ViewHelper and using the ResourceFactory to retrieve the processed file and get it's width/height. Or you set a fixed witdth (instead of maxWidth). Then you know at least the width.
I would close this, as this is a general support question and not strictly related to any Mask issue. If you need help, I would recommend you to ask in the TYPO3 slack channel "#random" or "#typo3-cms". There are hundreds of people, who can help you, instead of here mainly me.
Hello,
i tried too get the width and height by dimensions. but it doesnt return anything.