Just thought I'd share this, and apologies if many already know all this, but thought it might help some newer or less experienced forum owners.
So I wanted to strip exif data (in particular GPS Location data) from all the existing images on the site. There are addons that strip it during uploading of new photos, but not one for removing existing exif.
Long story short, after having a failed attempt at running something via the server and having to restore the files from a backup, and after a lot of tips from others on here (thanks @chillibear ), I ended up downloading the directories and using exiftool.
So this is just intended to make it quicker and easier for anyone else doing the same thing, after I wasted a few days getting to grips with it.
First issue was I couldn't get exiftool to work (on a Windows laptop) which apparently is fairly common. There is a website and instructions - but still didn't seem to work. I found one work around to use it within a file, but that changed the usual commands so I couldn't benefit from the shared ones on the exiftool site and forum - where I also got some help and tips having made a few mistakes.
So this is my take on how to do it quickly and easily:
1) Don't download exiftool from the exiftool site. Download it from here (this is recommended by the exiftool site also) - where it has an installer and can also be uninstalled afterwards. It makes life a lot easier. I opted to be the only user rather than "for all" at installation - just to keep the installation simple. It tells you where it's been installed.
2) In cmd I ran this
exiftool -r -ext data -all= -tagsfromfile @ -Orientation -overwrite_original (drop folder here)
Obviously the bit in brackets at the end isn't part of the command - you drag and drop the directory folder at the end of the command and return, and it then just runs.
This strips all exif data, and then replaces the orientation tags. To ensure the photos still display the right way round, as if everything is stripped, apparently that can be an issue. -r might not have been necessary for dropping individual files - I'd used that in an earlier attempt, when running through all the directories in one go (in one folder). But maybe it was still necessary - not sure! It didn't do any harm anyway. -ext data is to tell exiftool to read the .data files in the downloaded directories - because they're not jpegs. overwrite_original is to prevent it making backup/duplicate files (as I understand it). So it keeps the directory folders and file order in tact.
So it just runs (fairly quickly) removes all exif while replacing orientation tags.
Once set up it was quick and easy. So IMO - this is the easy way.
Earlier I had tried to only remove GPS location data with a different command. This threw a few errors and various bits to look at and tidy up afterwards - GPS pointers left behind, uncertain, possibly hidden XMP GPS location etc etc. And the need to run further commands to tidy up. And never quite managing to tidy up all the extra bits. I didn't realise how complex exif is. So in the end I decided it was quicker and easier just to strip all exif data, and completely remove anything GPS related - once I found the helpful command to ensure rotation exif was put back.
I dropped each directory folder individually (had 10). But it's possible to run a batch where it runs through all the directories in one folder, if you have a lot. However it did speed things up, with just 10 folders, just dragging each directory and dropping it on the end of the command (space at the end of the command). It also helped to see the output for each individual directory one at a time. Any odd file that had an error, the file number could be noted and it checked later viewing as a jpeg or in the exif viewer. But there was only one in all 10 directories and it was a bit of an irrelevant file (screenshot of a pdf or similar).
There is another way (more than one way which gets complicated) if you don't want to install it, but that ended up being more time consuming and installing it from the above link keeps it simple (and can be uninstalled afterwards).
Another way is to just download exiftool, from the exiftool site rename the application to exiftool.exe, copy the application and exiftool files inside the folder containing the files you want to strip exif data from. Shift and right click inside the folder, open command prompt and put commands in there. That limits the tool to only running within that folder and fidning things in that folder. However the commands change. exiftool isn't recognised. It has to be .\exiftool.exe xxxxxxxxxxxxxxxxxxx and various other parts of the sample commands need changing (and their website has many sample commands for doing different things). That got too fiddly.
So 1) and 2) above is, in my opinion, the quick easy way to strip exif from downloaded server files/images.
After stripping the exif in my 10 directories, I made a copy of each directory folder and renamed it as jpeg, so I could scan through and check all the images looked ok. And also loaded the contents into this browser based exif scanner to check everything was gone (which it was - except orientation tags).
You can run various other commands to check it's worked but I found this a quick, visual way of just checking all was as it should be - my directories contained about 700 files each and I could upload all the files into the scanner very quickly and just run through the results. It's all in-browser apparently, so nothing actually uploaded on the site.
sitecam.io
Having done this:
1) Made a backup of public_html/internal_data/attachments folder.
2) Deleted the directories in internal_data/attachments folder
3) Uploaded the directories with the stripped files to internal_date/attachments folder.
Which is where you download the directories from in the first place.
Edit - if I'm incorrect about this being the way to do things, please say!
So I wanted to strip exif data (in particular GPS Location data) from all the existing images on the site. There are addons that strip it during uploading of new photos, but not one for removing existing exif.
Long story short, after having a failed attempt at running something via the server and having to restore the files from a backup, and after a lot of tips from others on here (thanks @chillibear ), I ended up downloading the directories and using exiftool.
So this is just intended to make it quicker and easier for anyone else doing the same thing, after I wasted a few days getting to grips with it.
First issue was I couldn't get exiftool to work (on a Windows laptop) which apparently is fairly common. There is a website and instructions - but still didn't seem to work. I found one work around to use it within a file, but that changed the usual commands so I couldn't benefit from the shared ones on the exiftool site and forum - where I also got some help and tips having made a few mistakes.
So this is my take on how to do it quickly and easily:
1) Don't download exiftool from the exiftool site. Download it from here (this is recommended by the exiftool site also) - where it has an installer and can also be uninstalled afterwards. It makes life a lot easier. I opted to be the only user rather than "for all" at installation - just to keep the installation simple. It tells you where it's been installed.
2) In cmd I ran this
exiftool -r -ext data -all= -tagsfromfile @ -Orientation -overwrite_original (drop folder here)
Obviously the bit in brackets at the end isn't part of the command - you drag and drop the directory folder at the end of the command and return, and it then just runs.
This strips all exif data, and then replaces the orientation tags. To ensure the photos still display the right way round, as if everything is stripped, apparently that can be an issue. -r might not have been necessary for dropping individual files - I'd used that in an earlier attempt, when running through all the directories in one go (in one folder). But maybe it was still necessary - not sure! It didn't do any harm anyway. -ext data is to tell exiftool to read the .data files in the downloaded directories - because they're not jpegs. overwrite_original is to prevent it making backup/duplicate files (as I understand it). So it keeps the directory folders and file order in tact.
So it just runs (fairly quickly) removes all exif while replacing orientation tags.
Once set up it was quick and easy. So IMO - this is the easy way.
Earlier I had tried to only remove GPS location data with a different command. This threw a few errors and various bits to look at and tidy up afterwards - GPS pointers left behind, uncertain, possibly hidden XMP GPS location etc etc. And the need to run further commands to tidy up. And never quite managing to tidy up all the extra bits. I didn't realise how complex exif is. So in the end I decided it was quicker and easier just to strip all exif data, and completely remove anything GPS related - once I found the helpful command to ensure rotation exif was put back.
I dropped each directory folder individually (had 10). But it's possible to run a batch where it runs through all the directories in one folder, if you have a lot. However it did speed things up, with just 10 folders, just dragging each directory and dropping it on the end of the command (space at the end of the command). It also helped to see the output for each individual directory one at a time. Any odd file that had an error, the file number could be noted and it checked later viewing as a jpeg or in the exif viewer. But there was only one in all 10 directories and it was a bit of an irrelevant file (screenshot of a pdf or similar).
There is another way (more than one way which gets complicated) if you don't want to install it, but that ended up being more time consuming and installing it from the above link keeps it simple (and can be uninstalled afterwards).
Another way is to just download exiftool, from the exiftool site rename the application to exiftool.exe, copy the application and exiftool files inside the folder containing the files you want to strip exif data from. Shift and right click inside the folder, open command prompt and put commands in there. That limits the tool to only running within that folder and fidning things in that folder. However the commands change. exiftool isn't recognised. It has to be .\exiftool.exe xxxxxxxxxxxxxxxxxxx and various other parts of the sample commands need changing (and their website has many sample commands for doing different things). That got too fiddly.
So 1) and 2) above is, in my opinion, the quick easy way to strip exif from downloaded server files/images.
After stripping the exif in my 10 directories, I made a copy of each directory folder and renamed it as jpeg, so I could scan through and check all the images looked ok. And also loaded the contents into this browser based exif scanner to check everything was gone (which it was - except orientation tags).
You can run various other commands to check it's worked but I found this a quick, visual way of just checking all was as it should be - my directories contained about 700 files each and I could upload all the files into the scanner very quickly and just run through the results. It's all in-browser apparently, so nothing actually uploaded on the site.

Free Photo EXIF Metadata Viewer | SiteCam
Free tool to view EXIF metadata from your photos. Select your image and instantly see detailed information like GPS coordinates, camera model, date, and more.

Having done this:
1) Made a backup of public_html/internal_data/attachments folder.
2) Deleted the directories in internal_data/attachments folder
3) Uploaded the directories with the stripped files to internal_date/attachments folder.
Which is where you download the directories from in the first place.
Edit - if I'm incorrect about this being the way to do things, please say!
Last edited: