get image size

This block is part of the files group and was last modified in core v12.1.1.

get image size v12.1.1

Returns the dimensions of the image given.

In pins 1
  • file required
    file
Out pins 2
  • height
    number
  • width
    number
dimensions

A typical wiring for get image size: copy feeds the file pin; the height out pin feeds ===; the width out pin feeds >.

Studio canvas example for the get image size block: typical wiring for get image size.

Commonly used with

In production blueprints, this block is most often wired together with:

  • new object: this block feeds into it. Builds a new object filled with the given fields.
  • ===: this block feeds into it. returns true if the two values are equal. Compares any type: numbers by value across int/float, strings and booleans strictly, objects and arrays deeply. There is no string/number coercion, so "1" does not equal 1.
  • >: this block feeds into it. returns true if the number is higher.
  • create: feeds into this block. Creates a new function that can be executed using the given name.
  • copy: feeds into this block. Copies the given files into a destination directory, keeping each file's original name. The destination directory is a folder path (created if missing), not a full path including the filename — e.g. /public/uploads copies hero.png to /public/uploads/hero.png. Place the directory under /public/… to make the copies publicly servable via /static/…. To rename the copy, set the optional filename pin (single source file only). To fan one file out to several full paths and/or names at once, use the file spread block instead.
  • rename: feeds into this block. Renames the given files.

Version history

Introduced in v12.1.1.


Back to files Return to the main group to view all sub-groups Back to images Return to the group to view all blocks within this group