Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

How to get image size by script?

Avatar

Former Community Member
Hi,



I'm searching for any solution to get the height or width of a picture by script (Formcalc or JavaScript).

I need this to decide between pictures whether they are in horizontal or in vertical. For example, if a picture is horizontal the image field height should be 1,5in and if a picture is vertical the image field height should be changed into 3in by script.



Is there any suggestion?



Thanks and regards,



Matthias Maier
0 Replies