---
title: "get image size · RUAL Documentation"
description: "Returns the dimensions of the image given."
canonical: https://docs.rual.nl/block-types/files/file_get_image_size
language: en
---

# get image size

This block is part of the [`files`](https://docs.rual.nl/block-types/files) group and was last modified in core [`v12.1.1`](https://docs.rual.nl/core-versions/120101).

Returns the dimensions of the image given.

- file required `file`

- height `number`

- width `number`

| `dimensions` |
| --- |

A typical wiring for [get image size](https://docs.rual.nl/block-types/files/file_get_image_size): [copy](https://docs.rual.nl/block-types/files/file_copy) feeds the `file` pin; the `height` out pin feeds [===](https://docs.rual.nl/block-types/condition/condition_deep_equal); the `width` out pin feeds [>](https://docs.rual.nl/block-types/condition/condition_gt).

![Studio canvas example for the get image size block: typical wiring for get image size.](https://docs.rual.nl/canvas-examples/file_get_image_size.png)

### Commonly used with

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

- [new object](https://docs.rual.nl/block-types/object/object_new_fields): this block feeds into it. Builds a new object filled with the given fields.

- [===](https://docs.rual.nl/block-types/condition/condition_deep_equal): 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 &quot;1&quot; does not equal 1.

- [>](https://docs.rual.nl/block-types/condition/condition_gt): this block feeds into it. returns true if the number is higher.

- [create](https://docs.rual.nl/block-types/globals/trigger_custom_function): feeds into this block. Creates a new function that can be executed using the given name.

- [copy](https://docs.rual.nl/block-types/files/file_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](https://docs.rual.nl/block-types/files/file_rename): feeds into this block. Renames the given files.

### Version history

Introduced in [`v12.1.1`](https://docs.rual.nl/core-versions/120101).
