Skip to main content

How to have jQuery get image size in bytes, not image dimensions?



I am using jQuery 1.7.1.





After an image loads in the browser window, I want to retrieve its total byte size. Is there an object name / value for that?




Comments

  1. I don't think this is possible. You'll probably need a server-side language.

    ReplyDelete
  2. No, there is no way you can get the image size using jQuery or pure JavaScript. The only way is to get it from server side using ajax.

    You can get the image url send it to a service or server side page and have to page or service return the image size.

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?