I want to find image width and hight before upload to server using jQuery File Upload.Have you any suggestion?
Asked
Active
Viewed 150 times
-2
-
1Possible duplicate of [How to get image size (height & width) using JavaScript?](http://stackoverflow.com/questions/623172/how-to-get-image-size-height-width-using-javascript) – Madhawa Priyashantha Apr 10 '16 at 03:21
-
1Please look at http://stackoverflow.com/questions/12570834/how-to-preview-image-get-file-size-image-height-and-width-before-upload – Silagy Apr 10 '16 at 03:29
1 Answers
1
According to the jQuery-File-Upload Repo on Github to get the image height & width you need to use JavaScript-Load-Image (it will also help you in the resizing functionality if you want to)
The plugin have the following options, and I qoute:
sourceWidth: The width of the sub-rectangle of the source image to draw into the destination canvas. Defaults to the source image width and requires canvas: true.
sourceHeight: The height of the sub-rectangle of the source image to draw into the destination canvas. Defaults to the source image height and requires canvas: true.

Community
- 1
- 1

Khaled Al-Ansari
- 3,910
- 2
- 24
- 27