Get image size (pixels) by a url

Good day!

Is it possible to get the image size (in pixels) from url (web or “/system/images/…”) in scripts?

Thanks in advance.

Image size is going to depend on format, so you'd have to actually load the image via some existing mechanism (e.g. Java's ImageIO class). That's going to be slow and probably more trouble than it's worth.

If your image is in image management, we do store metadata along with the image record, but we don't expose any easy way to retrieve it. See these threads for how to access the ImageManager object on the gateway:

Once you've got an ImageRecord, you can ask the record for its width and height.