1

Possible Duplicate:
How to get image size (height & width) using javascript?

I'm dynamically loading different images with different dimensions.

<img src="A.png" alt="" />
<img src="B.png" alt="" />
<img src="C.png" alt="" />

How can I obtain the width and height of an image using JavaScript ?

I want to check the width of an image. For example:

if ( (width || height) < 200px) i want to double the size of image.

Thanks in advance.

Community
  • 1
  • 1
Jonas
  • 1,019
  • 4
  • 20
  • 33

0 Answers0