Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
73 stars 32 forks source link

Refactor EXIF stripping for images #192

Closed dappercrow closed 4 years ago

dappercrow commented 4 years ago

Context for change: I got really annoyed with the trouble involved in installing one of the pygobject subdependencies, so I spitefully refactored the code it was used in to do away with pygobject and use pillow, which was already in the requirements list. That happened to be the function that strips EXIF data from images.

Test steps

  1. Upload test image containing verified EXIF data to dev server
  2. Check EXIF data in image saved in /stor
  3. Verify that image served by dev site is browsable and also contains no EXIF data when downloaded
Polsaker commented 4 years ago

Thanks for the PR! Didn't knew PIL could strip EXIF data

dappercrow commented 4 years ago

AFAIK it's because PIL doesn't actually know how to handle EXIF data that this works.