---
title: "Discussion on \"Compress Images Without Losing Metadata: A Practical Guide for Developers and Photographers\" | Hashnode"
description: "Discussion on \"Compress Images Without Losing Metadata: A Practical Guide for Developers and Photographers\". Why compression strips EXIF, GPS, and copyright data — and how to prevent it"
url: "https://hashnode.com/posts/compress-images-without-losing-metadata-a-practical-guide-for-developers-and-photographers/6b00d4155d8edac5efce468f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Compress Images Without Losing Metadata: A Practical Guide for Developers and Photographers](https://geoimagetagger.hashnode.dev/compress-images-without-losing-metadata-a-practical-guide-for-developers-and-photographers?utm_source=hashnode&utm_medium=feed)

Why compression strips EXIF, GPS, and copyright data — and how to prevent it

3d ago · 5 min read · geoimagetagger.hashnode.dev  
Read the article

-   [#webdev](https://hashnode.com/tag/webdev)
-   [#imageprocessing](https://hashnode.com/tag/imageprocessing)
-   [#photography](https://hashnode.com/tag/photography)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[GeoImageTagger](https://hashnode.com/@geoimagetagger)

@geoimagetagger · Aachen, Germany

  
[View profile](https://hashnode.com/@geoimagetagger)

Free AI-powered image tools — geotagging, metadata editing, EXIF removal, compression, conversion, watermarking & image editing. All browser-based, no uploads.

Building free AI-powered image tools for photographers, local businesses, and SEO professionals. GeoImageTagger offers 9 browser-based tools: AI geotagging, metadata viewer &amp; editor, EXIF remover, image compressor, image converter, AI location finder, watermark tool, and image editor. Everything runs locally in your browser — your images never leave your device.

## Responses 2

Markdown supported · ⌘↵ to post

[Firefly Team](https://hashnode.com/@firefly-team)

[15h ago](https://hashnode.com/posts/compress-images-without-losing-metadata-a-practical-guide-for-developers-and-photographers/6b00d4155d8edac5efce468f/comment/6b04399c31692cedc08d706f)

One catch with the restore step: browsers now apply EXIF orientation when decoding into a canvas, so the re-encoded pixels are often already upright. If you then copy -all:all back from the original, Orientation=6 comes along and viewers rotate the image a second time. Resetting it after the copy (exiftool -Orientation=1 -n compressed.jpg) avoids that. Does your compressor normalise orientation before it writes the EXIF block back?

[GeoImageTagger](https://hashnode.com/@geoimagetagger)

[29m ago](https://hashnode.com/posts/compress-images-without-losing-metadata-a-practical-guide-for-developers-and-photographers/6b00d4155d8edac5efce468f/comment/6b04399c31692cedc08d706f#reply-6b0512e79ae9ba1cf0fb333e)

Great question, and you described the double-rotation trap exactly right. That is precisely the case the compressor handles safely: when it preserves metadata, it also normalizes the Orientation tag to match the pixels, so the photo displays the right way up in every viewer with EXIF, GPS and the rest of the metadata intact. We verified this across the orientation values for exactly this reason.

Thanks for raising it. It is the kind of detail that matters.
