5

I would like to get the metadata of an image that a user drags and drops into a webpage. I have the drag and drop set up. However, the image isn't actually uploaded to a server. It's accessed locally. Can I still get the metadata from the image using Javascript? If so, how do I do this? What good libraries are there?

If not, do I absolutely have to upload the image in order to extract the metadata? What's the fastest way to upload an image in Javascript?

dda
  • 6,030
  • 2
  • 25
  • 34
  • [html5 file api](https://developer.mozilla.org/en-US/docs/Using_files_from_web_applications) – epascarello Mar 22 '13 at 03:58
  • I think this would help you, http://stackoverflow.com/questions/5929356/read-meta-data-from-image-file-with-javascript – Tom Nov 05 '13 at 06:23

2 Answers2

4

There is a library: ImageInfo - read image metadata with JavaScript. Between that and local file access in HTML5 you should be able to get it.

UPDATE New link for the imageinfo library.

dda
  • 6,030
  • 2
  • 25
  • 34
-5

Basically, JavaScript cannot "touch" your local file, you just can do that using HTML5 + JavaScript or using Flash ActionScript

Phong Vo
  • 1,078
  • 7
  • 16