3

I've got a clean install of Craft with just some initial configuration of entry types, categories, assets, etc.

Any image I upload (either directly into assets or via an image field) has almost all of its EXIF metadata stripped out. Most of the removed info I don't care about, but it's essential that the embedded copyright, geolocation and keyword information is retained.

I assume this has something to do with the configuration of ImageMagick/GD (whichever Craft uses by default). Is there a way I can create a configuration that specifies which EXIF fields to preserve in the uploaded image?

2 Answers 2

3

Currently the images are being cleansed on upload, which means that they are being re-saved to make sure that no malicious code is injected in them.

Unfortunately, this means that EXIF data gets stripped out along the way, but since Craft already uses PEL, it should be possible to tweak Craft a bit so that the EXIF metadata is preserved during this operation. We'll look into that and, hopefully, this will make it to a release pretty soon.

5
  • Thanks, and good to hear it shouldn't be hard to fix. Currently this is a dealbreaker for me using Craft on a few sites. Commented Jul 24, 2015 at 12:44
  • @EvanWarner, Andris: I'm not exactly sure what you both are talking about, as I have a lot of EXIF metadata, that I can access from uploaded assets with my plugin Asset Metadata (uses the library getID3). Why does this work for me?
    – carlcs
    Commented Jul 24, 2015 at 13:09
  • @carlcs: Not sure why it works for you but I'd love to find out. Here's a diff of my image EXIF pre- and post-upload. Commented Jul 24, 2015 at 17:59
  • @carlcs, are these assets uploaded via Craft or uploaded outside of Craft and indexed thereafter? Commented Jul 25, 2015 at 10:06
  • Uploaded from the CP. ImageMagick is installed, if that matters.
    – carlcs
    Commented Jul 25, 2015 at 11:59
2

For Craft 3 the setting 'preserveExifData' in config/general.php should be set to true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.