# How to get width of a loaded image

**URL:** <https://forum.kirupa.com/t/how-to-get-width-of-a-loaded-image/215204>\
**Category:** Uncategorized\
**Created:** [February 5, 2007, 12:42pm UTC](https://forum.kirupa.com/t/how-to-get-width-of-a-loaded-image/215204 "2007-02-05T12:42:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![surya\_mayekar](https://avatars.discourse-cdn.com/v4/letter/s/a698b9/32.png) [@surya\_mayekar](https://forum.kirupa.com/u/surya_mayekar)\
**Post date:** [February 5, 2007, 12:42pm UTC](https://forum.kirupa.com/t/how-to-get-width-of-a-loaded-image/215204/1 "2007-02-05T12:42:52Z")

</div>

i am creating a image gallery in which i want to have different width of images (height is same) as thumbs, i am not able to get the width (i can only get the even width of s[ecofoed) of the image to make a scroller. how do i get the width of images that i am loading images thru xml.
