please tell me how to get image file size in bytes using javascript.
Thanks
If javascript engine supports canvas elements you can try to use canvas element and getImageData to fetch the pixel data from your image. Then, depending on type of the image you could create the binary representation of this image.
Here is info about canvas element and getImagedata api:
http://www.whatwg.org/specs/web-apps/current-work/#dom-context-2d-getimagedata