# How do I find an image's width or height?

**URL:** <https://forum.makecode.com/t/how-do-i-find-an-images-width-or-height/29778>\
**Category:** Help\
**Tags:** graphics-and-math, art\
**Created:** [July 22, 2024, 4:24am UTC](https://forum.makecode.com/t/how-do-i-find-an-images-width-or-height/29778 "2024-07-22T04:24:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BLADEr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blader/32/16422_2.png) [@BLADEr](https://forum.makecode.com/u/BLADEr)\
**Post date:** [July 22, 2024, 4:24am UTC](https://forum.makecode.com/t/how-do-i-find-an-images-width-or-height/29778/1 "2024-07-22T04:24:50Z")

</div>

I’m just wondering how or where I could find only the width or the height of an image. Kind of like the block (background width) but with a different image. Does anybody know?

---

<div class="post-metadata">

**Author:** ![Luke](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/luke/32/32519_2.png) [@Luke](https://forum.makecode.com/u/Luke)\
**Post date:** [July 22, 2024, 3:10pm UTC](https://forum.makecode.com/t/how-do-i-find-an-images-width-or-height/29778/2 "2024-07-22T15:10:07Z")

</div>

If you open up the spite x menu and scroll down you can find it. There’s all kinds of cool sprite stuff there as well like scale and z height

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [July 22, 2024, 3:13pm UTC](https://forum.makecode.com/t/how-do-i-find-an-images-width-or-height/29778/3 "2024-07-22T15:13:16Z")

</div>

I can’t see a way to. Perhaps save the dimensions in advance like in an array?

---

<div class="post-metadata">

**Author:** ![BLADEr](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blader/32/16422_2.png) [@BLADEr](https://forum.makecode.com/u/BLADEr)\
**Post date:** [July 22, 2024, 7:59pm UTC](https://forum.makecode.com/t/how-do-i-find-an-images-width-or-height/29778/4 "2024-07-22T19:59:09Z")

</div>

Ah, yes. thanks for being so helpful Luke! I’m trying to make a dungeon crawler game that uses cellular automata and I’m trying to map out biomes.

---

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [July 22, 2024, 10:16pm UTC](https://forum.makecode.com/t/how-do-i-find-an-images-width-or-height/29778/5 "2024-07-22T22:16:05Z")

</div>

Ah, Thanks!
