okfde / froide

Freedom Of Information Portal
MIT License
356 stars 86 forks source link

♻️ Replace exif-js with exifreade; fix exif support detection; cache image #674

Closed pajowu closed 1 year ago

pajowu commented 1 year ago

This commit improves the handling of uploaded images in the document uploader of the attachment management component (i.e. the thing where you create a document out of uploaded images). It does three things:

  1. It replaces the library we use for exif detection in the images. Until now we used exif-js which is no longer maintained and does not work in strict mode
  2. It fixes the exif support feature detection
  3. We now load the image in the component as a blob and stores it there. Until now the image was loaded by the img-tag in the browser and again by exif-js. However we can serve both from the component.