Curious... why strip EXIF from attachments but embrace it in the gallery?

Kevin

Well-known member
After digging (way too deep) into attachments & EXIF, curious to the thought process behind stripping the EXIF data from attachments while at the same time seemingly embracing it in the gallery? 🤔
 
it sounds logically
Not really since the gallery offers no way of disabling the EXIF or, at the least, removing the GPS tags. Typical image sharing sites like Flickr offer user options to control their EXIF data. Vice versa, there is no way of not stripping the data from attachments.

Seems more of a product marketing point than anything.
 
Most files you download from most websites on the internet have EXIF stripped, so makes sense it would be stripped from attachments uploaded to the forum as well.

I think the reason it's enabled in Media is because most forums are for hobbyists around a particular topic and I think there is overlap between hobbyists in one domain with people who are into photography, where the EXIF data is interesting to other photographers (camera type and settings, etc.).
 
Most files you download from most websites on the internet have EXIF stripped, so makes sense it would be stripped from attachments uploaded to the forum as well.

I think the reason it's enabled in Media is because most forums are for hobbyists around a particular topic and I think there is overlap between hobbyists in one domain with people who are into photography, where the EXIF data is interesting to other photographers (camera type and settings, etc.).
The curiosity at hand is not what the sections of XF might be used for but rather that it is inconsistent to force two opposing ideologies in the same software. In one section of XF user EXIF is forced to be stripped out regardless of whether you want it to be or not while another part of XF forces you to share EXIF whether you want it to be or not.
 
I don't believe we explicitly strip EXIF data in most cases (though I'd have to double check). If you upload a small image as an attachment and re-download it, it'll likely still have the EXIF data in it. If you upload an image that gets resized, that's a different story, but the data isn't maintained by GD. I believe Imagick can retain it, though I think we do strip it there -- that's more for a consistent output, though additionally EXIF data can take up a significant amount of space depending on what exactly is in it (like embedded thumbnails). Percentage-wise, on a small image, this is much more significant.

Equally, I don't think that stripping EXIF data and displaying a subset are inherently at odds. There are some EXIF details that can leak things that people might not realize, like GPS coordinates. Conversely, an aperture or shutter speed doesn't reveal any personal information.
 
I think stripping at the minimum, the location data is probably the safest default behaviour, for privacy reasons. Or stripping it from the image itself, even if it’s stored elsewhere in the database.

The ability to (optionally) save gallery media with location data, or manually override it, can be pretty useful though.

With @sonnb’s gallery you can browse a map and view photos by location, which can be great for events or venues where lots of users are uploading media taken at the same location.

However this should probably be an optional feature that requires actioned user consent when uploading, as if it’s defaulted to on then it can unknowingly expose the users home addresses, in some cases this is incredibly accurately.

189702

189700
 

Attachments

  • 2B86DF26-9785-4613-BB09-8F87F9479CC0.webp
    2B86DF26-9785-4613-BB09-8F87F9479CC0.webp
    73.9 KB · Views: 8
Last edited:
In XFMG you can decide yourself which EXIF data you show and which not. Geo location data should not be shown without a clear reason and a clear warning to your users.

It is a large security risk if you allow EXIF location data to stay in pictures uploaded to your forum posts. Many people are not aware that this allows everyone to find out where exactly they live, work, etc. I can't believe that XenForo still does not strip the location data out of forum attachments.

For XF1, we use this add-on to protect our users:
 
Equally, I don't think that stripping EXIF data and displaying a subset are inherently at odds. There are some EXIF details that can leak things that people might not realize, like GPS coordinates. Conversely, an aperture or shutter speed doesn't reveal any personal information.
With XFMG that personal info' like GPS coordinate are still in the image, just not being shown in the GUI. The image that is presented in the browser can be easily scanned for the GPS info. Besides GPS info there isn't much else in there that might be considered personal but some people might be auto-populating the Artist and/or Copyright values with their real names without realizing it (depending on their setup).
I don't believe we explicitly strip EXIF data in most cases (though I'd have to double check). If you upload a small image as an attachment and re-download it, it'll likely still have the EXIF data in it. If you upload an image that gets resized, that's a different story, but the data isn't maintained by GD. I believe Imagick can retain it, though I think we do strip it there -- that's more for a consistent output, though additionally EXIF data can take up a significant amount of space depending on what exactly is in it (like embedded thumbnails). Percentage-wise, on a small image, this is much more significant.
You're right about the embedded thumbnails, something more common then some may realize, and you've put something else on my "To Do" list. :D

For XF1, we use this add-on to protect our users:
Interesting, can that remove just the GPS meta tag group or does it remove all EXIF (and just EXIF or all meta tags)? Ideally, for any site dealing with photography, uploaded images, whether in the forums or XFMG, would allow the retention of meta tags while selectively stripping some. I don't think selectively stripping tags will ever become an XF item because it really isn't that easy to do with straight PHP (unless a 3rd party library like ExifTool is incorporated) but it'd still be nice if admins had a choice in whether it should be stripped or not so we can, at the very least, be able to tell users "Yes, your data is stripped." or "No, your data isn't stripped, be cautious." instead of "Well, if you upload the photo in this spot your data is stripped but if you upload the exact same photo to this other spot then your data isn't stripped so be cautious here but not there."
 
With XFMG that personal info' like GPS coordinate are still in the image, just not being shown in the GUI.
Right, but I believe that is the case with attachments too, if they don't get touched by the image processing systems. Most noticeably this would be for resizing an image to fit, though we do also rotate images based on EXIF details. I was mostly trying to respond to your initial position, though it wasn't 100% clear what you were referring to. I presumed you were referring to the EXIF details that XFMG picks out and displays and I see no issue displaying that even if we chose to aggressively strip EXIF data in the future.

For reference, I have just exported a photo of mine from Lightroom and uploaded it to my local install. After downloading, I can still see the EXIF data -- it's the same bytes that I originally uploaded. I reduced my attachment dimensions such that it was then resized and the data was stripped. This is consistent with what I was saying. The EXIF stripping is more incidental based on some environmental settings and you may be seeing different behavior because you aren't necessarily hitting dimension limits in the MG. There may be a difference in behavior, but your messages make it seem like we're actively stripping EXIF in posts and not in the gallery.

I vaguely thought there was an open suggesting about stripping EXIF data from uploads, though the only suggestion I found actually related to maintaining it through image processor actions (presumably most specifically because of things like copyright).
 
There may be a difference in behavior, but your messages make it seem like we're actively stripping EXIF in posts and not in the gallery.
But XF is actively stripping EXIF posts and not in gallery, with a "*" footnote of "Based on settings", and it is out of our control (the stripping, not the settings). It'd be far more consistent if admins were able to control to either strip or not strip at a higher level then having to rely upon file size/dimensions & what part of XF something is uploaded to.

Note that this is more of a frustration borne out of spending some time digging through the topic in general as part prepping a 2.1.x migration for a 1.x add-on heavy reliant site.
 
I think it would be really necessary to add an option to remove EXIF data, so I created a suggestion:

 
Old topic, but why shouldn't all data be removed? It's a photo in a forum. Me, I'd be happy just to be able to turn of the Metadata display option.
 
Old topic, but why shouldn't all data be removed? It's a photo in a forum. Me, I'd be happy just to be able to turn of the Metadata display option.

Author and copyright tags, for instance, that someone may want to keep in their images.
 
Perhaps. I just don't want it displayed in a tab in the Media Gallery. 99% of people have no idea how their privacy can be invaded.
 
Perhaps. I just don't want it displayed in a tab in the Media Gallery. 99% of people have no idea how their privacy can be invaded.
Yes that. Imagine if folks upload images with geotags which they forget are embedded and upload photos revealing their locations which they didn't intend to.
 
  • Like
Reactions: HWS
Hello guys!
Recently I received some complaints from my forum members that the EXIF data (more specifically the GPS coordinates) are appearing on their uploaded images. For this reason, I developed a small addon to prevent it.

You can find it here:

(y)
 
Back
Top Bottom