Metadata & orientation
imgsqz makes two deliberate choices about image metadata: it strips it by default, and it bakes in the correct orientation. Here’s what that means and how to change it.
Metadata is stripped by default
Section titled “Metadata is stripped by default”By default, EXIF and ICC metadata are removed from the output. This:
- Shrinks files — EXIF blocks can be tens of kilobytes.
- Protects privacy — strips GPS coordinates, camera serial numbers, timestamps and other embedded data before you publish.
imgsqz photo.jpg # metadata strippedKeep metadata with --no-strip-metadata
Section titled “Keep metadata with --no-strip-metadata”When you need to preserve EXIF/ICC — color-managed print workflows, photo archives, attribution — opt back in:
imgsqz photo.jpg -f webp --no-strip-metadataThis keeps the source’s metadata (EXIF, ICC color profile) in the output.
Orientation is always corrected
Section titled “Orientation is always corrected”Cameras and phones often store an image sideways plus an EXIF orientation tag that says “rotate me on display.” imgsqz auto-rotates every image to its upright position before doing anything else, then writes the pixels already upright.
That means:
- Output always looks correct, even in viewers that ignore EXIF orientation.
--width/--heightrefer to the visually upright image, so “width” is what you see.- Because the rotation is baked into the pixels, stripping the orientation tag (the default) can’t un-rotate your image.
# A phone photo stored sideways comes out upright, 1080px wideimgsqz IMG_2207.jpg --width 1080 -f webpQuick reference
Section titled “Quick reference”| You want… | Flag |
|---|---|
| Smallest files, no embedded data (default) | (none) |
| Preserve EXIF / ICC color profile | --no-strip-metadata |
| Correct rotation | automatic, always on |
Next: Replacing files in place.