<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Imagey</title>
    <description>The latest articles on DEV Community by Imagey (@imagey).</description>
    <link>https://dev.to/imagey</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4269237%2F15138a32-bd5e-486e-8128-24c6ff6f9eb0.png</url>
      <title>DEV Community: Imagey</title>
      <link>https://dev.to/imagey</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/imagey"/>
    <language>en</language>
    <item>
      <title>I almost committed a photo with a GPS tag. Here's how I remove EXIF data now</title>
      <dc:creator>Imagey</dc:creator>
      <pubDate>Fri, 27 Nov 2026 15:16:55 +0000</pubDate>
      <link>https://dev.to/imagey/i-almost-committed-a-photo-with-a-gps-tag-heres-how-i-remove-exif-data-now-95j</link>
      <guid>https://dev.to/imagey/i-almost-committed-a-photo-with-a-gps-tag-heres-how-i-remove-exif-data-now-95j</guid>
      <description>&lt;p&gt;Last month I opened a documentation PR and only afterwards noticed the header photo still carried a location tag. The picture was taken on the sidewalk outside the office. I had cropped it and saved a “web” copy, but I had not remembered to remove EXIF data. The latitude and longitude were still in the file.&lt;/p&gt;

&lt;p&gt;Git does not strip that information for you. A host may drop metadata when you upload a picture to a social feed; a raw file in a public repository is just the bytes you committed. If the image is a phone photo, those bytes often include a GPS position, a camera model, a timestamp, and sometimes a software tag. If it is a screenshot, you may get less, but you should not assume you got nothing.&lt;/p&gt;

&lt;p&gt;This is the short checklist I now run before I push screenshots, hero images, or any photo I did not create as a graphic from scratch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6omge67e6md3j12ytgm2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6omge67e6md3j12ytgm2.jpg" alt="A printed photograph and a smartphone rest on a wooden desk beside a closed notebook." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually leaks
&lt;/h2&gt;

&lt;p&gt;I used to think of EXIF as “camera nerd data.” The tags that have bitten me are more ordinary than that.&lt;/p&gt;

&lt;p&gt;Phone photos frequently store a GPS position. Even when the picture looks like a generic street or a conference hallway, the coordinates can point at a home office, a client site, or a coworker's neighborhood. Camera make and model, and the date, are common too. None of that belongs in a public README if you can help it.&lt;/p&gt;

&lt;p&gt;Screenshots are usually safer, but I still check them. Some tools write a software tag or a creation date. A cropped export does not automatically mean a clean export. The last time I got sloppy, the crop was fine and the metadata was the original.&lt;/p&gt;

&lt;p&gt;If you want to see what is in a file on your own machine, a direct way is ExifTool:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;exiftool hero.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look specifically for GPS, location, camera, and date fields. On a Mac you can also use Preview’s Inspector; on Windows, the file Properties dialog shows a subset. I still prefer ExifTool because it prints the long tail of tags I would otherwise miss.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two different meanings of “strip”
&lt;/h2&gt;

&lt;p&gt;This is the part I had wrong for a while. “Take the metadata off” can mean two different operations.&lt;/p&gt;

&lt;p&gt;One is an EXIF-only edit: you remove the tagged headers and leave the compressed image data as it is. For a JPEG, that usually keeps the pixels you already have, which matters when you do not want a second generation of compression. The same idea applies to many PNG and WebP files.&lt;/p&gt;

&lt;p&gt;The other is a full wipe that re-encodes the picture, often as a new PNG. That is the more cautious option when you want every extra chunk gone and you are willing to accept a re-encode. It is also the option that can change the file size.&lt;/p&gt;

&lt;p&gt;If a tool offers both, read the label. I now look for language like “EXIF-only” versus “re-encode” before I download anything I plan to commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The command I use when I already have a terminal
&lt;/h2&gt;

&lt;p&gt;When I am on my laptop and ExifTool is installed, I do not overwrite the original. I write a copy into a folder I will actually commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;mkdir -p assets/clean
exiftool -all= -o assets/clean/ hero.jpg
exiftool assets/clean/hero.jpg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The second command is the one I used to skip. I want to see an empty GPS block, not assume the write worked. If a tag survives, I deal with it before I &lt;code&gt;git add&lt;/code&gt; the file.&lt;/p&gt;

&lt;p&gt;I keep the original outside the repo, or in a local directory that is gitignored. The copy in &lt;code&gt;assets/clean&lt;/code&gt; is the only image path the Markdown is allowed to reference.&lt;/p&gt;

&lt;p&gt;For a pile of files, ExifTool can run over a directory. I still spot-check two or three outputs. A batch command that I never inspect is how the location tag got into that PR in the first place — not because the tool failed, but because I uploaded the wrong folder.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flvun8zqntua1r79t23or.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flvun8zqntua1r79t23or.jpg" alt="A laptop seen from the side on a desk, its screen showing only a soft unreadable glow, next to a stack of printed photos." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  When I need to remove EXIF data without a CLI
&lt;/h2&gt;

&lt;p&gt;Some days I am on a machine where I cannot install ExifTool, or I am reviewing a photo someone else dropped into Slack. In that case I use a browser tool that can &lt;a href="https://imagey.net/remove-exif-data/" rel="noopener noreferrer"&gt;strip EXIF from a JPEG, PNG, or WebP, or export a clean PNG&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The setting that matters is the one labeled for removing all metadata and re-encoding to PNG. If I only need the EXIF and GPS tags off, and I want to keep the existing compressed pixels, I leave that broader re-encode off and inspect the preview. If I want the more complete wipe, I turn it on and accept a PNG. The original file stays untouched either way, which is the habit I want: never replace the source, always download a new copy, then run a viewer against that copy.&lt;/p&gt;

&lt;p&gt;I should say this directly: I work on that tool, and on the &lt;a href="https://imagey.net/" rel="noopener noreferrer"&gt;broader set of browser image tools&lt;/a&gt; next to it. This is the workflow I actually use, not a survey of metadata editors, and I am not going to invent a comparison chart. You can edit and preview before signing in; a free account is required to download, save, or share the result. If I still need a smaller width or a different format after the metadata is gone, I start from the cleaned copy, not from the phone original.&lt;/p&gt;

&lt;p&gt;After I download, I run ExifTool (or at least the OS inspector) on the new file anyway. A browser preview is not a substitute for reading the tags in the file I am about to commit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pre-commit list I actually follow
&lt;/h2&gt;

&lt;p&gt;I wrote this on a sticky note and then moved it into the team docs. It is short on purpose.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If the image started life as a camera or phone photo, assume it has tags until you have checked.&lt;/li&gt;
&lt;li&gt;Inspect the file you will commit, not the file you think you exported.&lt;/li&gt;
&lt;li&gt;Prefer an EXIF-only strip when you want to keep the current pixels; use a full re-encode when you want a clean PNG and you do not mind a new encoding.&lt;/li&gt;
&lt;li&gt;Confirm the cleaned copy has no GPS and no camera fields you would not print on the docs page.&lt;/li&gt;
&lt;li&gt;Point the Markdown at the cleaned path. Keep originals out of the repository.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That is the whole habit. It takes longer to explain than to do, and it would have saved me a slightly awkward “please don’t merge yet” message last month.&lt;/p&gt;

</description>
      <category>git</category>
      <category>privacy</category>
      <category>webdev</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
