Can I get an image’s file size and mime-type via JavaScript. I am writing a script for inspecting all images in a document. I will run the script in FireFox only so a solution specific to FireFox (undocumented/non-standard/otherwise) is perfectly acceptable. I can use jQuery if necessary.
Share
You could make a
HEADrequest with XHR which will tell you the file size, provided these images are on your domain.