Can I get an image's file size and mime-type via JavaScript (FireFox/Gecko/Mozilla only) -


Can I get an image file size and mime-type via Javascript I inspect all the images in a document I am writing a script to do I will run scripts in Firefox so that specific solutions for Firefox (undocumented / non-standard / otherwise) are absolutely acceptable. I can use jQuery if necessary.

You can request a head XHR which will tell you the size of the file , Provided that these images are on your domain.

Comments