# JavaScript to return image resolution

**URL:** https://community.glideapps.com/t/javascript-to-return-image-resolution/73043
**Category:** Community Resources
**Created:** [May 3, 2024, 2:56pm UTC](https://community.glideapps.com/t/javascript-to-return-image-resolution/73043 "2024-05-03T14:56:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tuzin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tuzin/32/86077_2.png) [@tuzin](https://community.glideapps.com/u/tuzin)
#### Post date: [May 3, 2024, 2:56pm UTC](https://community.glideapps.com/t/javascript-to-return-image-resolution/73043/1 "2024-05-03T14:56:19Z")

</div>

Use this code in JavaScript column with your image URL set as p1 variable to get image resolution.

```auto
var img = new Image();

img.src = p1;
    
return(img.naturalWidth + 'x' + img.naturalHeight);

```

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/7/5/75a25b0e493c0d7ad4e67a50af16a110b7511afc.png)
