You know when you put your head on your pillow at night and your brain decides that’s the perfect time to remind you of a programming fix? That happened to me last night — only instead of a fix, I remembered that up until, well, last night, I wasn’t stripping metadata from the images I was posting on this blog.

It wasn’t a big deal at all — I’ve only ever posted screenshots and they don’t contain much of anything useful. Still, I thought it would be a good idea to strip the metadata before deploying going forward.

I actually wrote a Github Workflow Action —joshmenden/strip-image-metadata-action — that’s easy to incorporate into your Github workflow.

All you have to do is create a step that uses joshmenden/strip-image-metadata-action@v1, and then pass in what directory you’d like it to strip the metadata.

Here’s an example workflow:

The action is dead simple . It basically just installs ImageMagick, then runs the mogrify -strip command to remove any metadata present.

Again, the Github repo for that can be found here .

Happy Coding!