-
Improvement
-
Resolution: Workaround exists
-
Neutral
-
None
-
2.2.5
-
None
-
-
Empty show more show less
-
Yes
-
Yes
Due to request from support, after checking with our KB, we didn't have an explicit support for this on either documentation or codebase:
From earlier Magnolia versions I know a way via model class...
PropertyUtil.getLong(AssetNodeTypes.AssetResource.getResourceNodeFromAsset(node), AssetNodeTypes.AssetResource.WIDTH, 0l);But this is slightly complicated. You need your own model class and so on... Is there simple way to retrieve the image width/height directly inside FTL template?
Workaround
Using damfn you can get the Asset object which has a getMetadata() method. The MagnoliaAssetMetadata has both getWidth() and getHeight() methods.
Acceptance criteria