Hello,
First of all: awesome library ;)
Now to the business. :D
I noticed you started having problems with bugs in exif-js which was left unmaintained for years now. And now there's adaptation of the library inside this repo, and thoughts of replacing it #1928.
I would love to help out here and offer my library exifr.
I started writing it because of the state of exif-js as well as my needs to be able to process hundreds of photos (i.e. gigabytes of photos) as fast as possible in my app. Since then I kept adding more features, like thumbnail extraction, ICC support, TIFF and HEIC file formats, filtering (so that parsing stops as soon as all wanted tags are found) and more.
Recently I released 3.0.0 - a major rewrite from the ground up. One of the goals was modularization. To separate file readers (jpg, tiff, heic), segments parsers (tiff/exif, xmp, iptc, icc, jfif) and even tag dictionaries (which always take up the most of the library's size). So that you can pick and choose just what you need, leave out the unused code.
Anyway. I would love to help out with not only replacing exif-js with exifr (and doing the PR myself) but also supporting, fixing bugs or implementing whatever is necessary for it to work.
Thank you,
I hope you consider it.
Hi @MikeKovarik! This sounds like awesome awesomeness! Great library, too, I love your modular approach. Example here https://mutiny.cz/exifr/ doesn鈥檚 work for me in Firefox, but works in Chrome (Maybe we could also replace the DnD area with Uppy ;)
We鈥檇 love it if you did the PR, and we鈥檒l mention you in the release blog post and tweet if it works out well and is cross-browser (IE 10 is still supported by Uppy, we鈥檒l drop it in 2.0). As for features, we need orientation the most, but maybe being able to read resolution, and maaaybe geo-tags would be nice too. If your lib is modular like that, maybe we could only do orientation in @uppy/thubmnail-generator and then have a separate @uppy/image-meta plugin or something, which would add optional support for resolution + geo tags. Maybe. Thinking out loud here.
Hi, thank you, glad you like it. I gave it my best.
Firefox: Turns out it was my blindspot. I excessively tested the library in both browsers and node and set up the transpilation to make it work way back to IE11. But then i forgot to test the website in other evergeen browsers because I'm used to the feature parity, now that we have ESM and stuff everywhere. :D turns out class fields aren't yet supported in neither FF, nor Safari. But it's fixed now. So thanks for pointing that out.
And yeah :D we could put uppy in the exifr page. Or better yet, to the full fledged metadata parsing webapp that I'd like to build now, that wouldn't feel like a demo page for a library. It'd be powerful to open to open file picker from onedrive or dropbox from the page. The mention in release post would be awesome. I'd love to spread the word now that I've poured so much into the library.
Regarding orientation: The v3 of exifr has this seemingly small but powerful feature - filters. You can limit what tags to parse and exifr stops once all requested tags are found. Whereas other libraries do the full sweep and then pick one tag and throw away the rest. Since I anticipated a lot of users wanting just a simple task of finding the orientation or gps coords, I baked in two optimized methods exifr.orientation() and exifr.gps(). And yes, we can go from there and utilize various metadata in more places in uppy, if you can find the use :)
IE10: This may be a bit of complication. I use quite a few modern standards in exifr, like Maps because they're faster than objects. Luckily IE11 supports it, and there are polyfills for the rest. But i didn't expect anyone supporting IE10. I don't mind looking into it, but may take a little longer than just swapping the files.
Could you tell me about the roadmap to 2.0? And about build and transpilation? I only found babel.config.js but it feels empty, there's no ie or env setting in there. Am I missing something?
It took a while to make exifr compatible with IE10 but fortunately the PR #2140 is done :).
Though pipeline crashed despite working on my machine. I will have to investigate.
The PR is now fixed and tests passed.
@MikeKovarik thank you! I鈥檓 gonna try and review ASAP.
Most helpful comment
The PR is now fixed and tests passed.