DEV Community

Cover image for Hands-On: See Image Metadata Removal in Action
Raviteja Nekkalapu
Raviteja Nekkalapu

Posted on

Hands-On: See Image Metadata Removal in Action

A practical verification guide using free tools to compare before and after


Introduction

You've heard about metadata risks and image rebuilding. But how do you prove it actually works?

This guide teaches you to:

  1. Inspect image metadata using free tools
  2. See exactly what data your photos contain
  3. Verify that processing actually removes everything

No coding required. Just free online tools and 10 minutes.


Part 1: Understanding What's Hidden in Your Images

1.1 The Invisible Data

Every photo you take contains hidden metadata:

┌─────────────────────────────────────────────────────────────┐
│                   What's Inside Your JPEG                   │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  📍 GPS COORDINATES                                         │
│  ├── Latitude: 37.7749° N                                   │
│  ├── Longitude: 122.4194° W                                 │
│  └── Altitude: 16 meters                                    │
│                                                             │
│  📱 DEVICE INFORMATION                                      │
│  ├── Make: Apple                                            │
│  ├── Model: iPhone 14 Pro                                   │
│  ├── Software: iOS 17.1                                     │
│  └── Serial Number: DNXXXXXXXX                              │
│                                                             │
│  📅 TIMESTAMPS                                              │
│  ├── Date Taken: 2024-03-15 14:32:07                        │
│  ├── Date Modified: 2024-03-15 14:32:07                     │
│  └── Time Zone: PST (UTC-8)                                 │
│                                                             │
│  📷 CAMERA SETTINGS                                         │
│  ├── Aperture: f/1.8                                        │
│  ├── Shutter Speed: 1/125                                   │
│  ├── ISO: 100                                               │
│  ├── Focal Length: 24mm                                     │
│  └── Flash: Off                                             │
│                                                             │
│  🖼️ EMBEDDED THUMBNAIL (Full separate image!)               │
│                                                             │
│  💬 COMMENTS (Can contain ANYTHING)                         │
│                                                             │
└─────────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

All of this is invisible when you view the photo normally. But anyone with basic tools can extract it.


Part 2: Free Online Tools to Inspect Metadata

Option 1: Jeffrey's EXIF Viewer (Recommended)

Website: exif.regex.info/exif.cgi

How to use:

  1. Go to the website
  2. Upload your image OR paste an image URL
  3. Click "View Image Data"
  4. See complete metadata analysis

What you see:

┌─────────────────────────────────────────────────────────────┐
│  Jeffrey's Exif Viewer - Results                            │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  EXIF                                                       │
│  ├── Camera: iPhone 14 Pro (Apple)                          │
│  ├── Date: 2024:03:15 14:32:07                              │
│  ├── Resolution: 4032 × 3024                                │
│  └── ... 47 more fields                                     │
│                                                             │
│  GPS                                                        │
│  ├── Latitude: 37° 46' 29.64" N                             │
│  ├── Longitude: 122° 25' 9.84" W                            │
│  └── 📍 [Map Link]                                          │
│                                                             │
│  IPTC                                                       │
│  └── (empty)                                                │
│                                                             │
│  XMP                                                        │
│  ├── Creator Tool: Photos 8.0                               │
│  └── ... 12 more fields                                     │
│                                                             │
└─────────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Option 2: ExifMeta.com

Website: exifmeta.com

Features:

  • Drag-and-drop upload
  • Clean visual interface
  • Shows GPS on a map
  • Highlights privacy-sensitive fields

Option 3: Online EXIF Viewer (Jimpl)

Website: jimpl.com/exif

Features:

  • Very simple interface
  • Shows embedded thumbnails
  • Highlights common metadata fields

Option 4: Browser DevTools (for URLs)

If you have an image URL, many browsers can show basic metadata:

  1. Right-click image → "Open image in new tab"
  2. Right-click → "Inspect"
  3. Look at the Network tab for headers

(This only works for basic data, not EXIF)


Part 3: Step-by-Step Verification

Let's verify that image rebuilding actually removes metadata.

Step 1: Find a Test Image

Use a photo from your phone or camera. Phone photos are ideal because they contain:

  • GPS coordinates
  • Device information
  • Timestamps
  • Camera settings

Where to get test images:

  • Your phone's photo library
  • Photos you've taken recently
  • Any JPEG from a digital camera

⚠️ Don't use screenshots - they typically have minimal metadata.


Step 2: Check BEFORE Metadata

Using Jeffrey's EXIF Viewer:

  1. Go to exif.regex.info/exif.cgi
  2. Click "Choose file"
  3. Upload your original photo
  4. Click "View Image Data"

What to look for:

Field Privacy Risk Example Value
GPS Latitude/Longitude 🔴 HIGH 37.7749, -122.4194
DateTimeOriginal 🟡 MEDIUM 2024:03:15 14:32:07
Make/Model 🟡 MEDIUM iPhone 14 Pro
Software 🟢 LOW iOS 17.1
SerialNumber 🔴 HIGH DX3XXXXXXXX
Thumbnail 🔴 HIGH (embedded image)

Save the results! Take a screenshot or copy the data. You'll compare it later.


Step 3: Process Through the API

Use the RapidAPI playground (see our testing guide) or run this command:

curl -X POST 'https://zero-trust-api.p.rapidapi.com/' \
  -H 'x-rapidapi-key: YOUR_KEY' \
  -H 'x-rapidapi-host: zero-trust-api.p.rapidapi.com' \
  -H 'Content-Type: image/jpeg' \
  --data-binary @your_original_photo.jpg \
  --output rebuilt_photo.png
Enter fullscreen mode Exit fullscreen mode

Save the output file: rebuilt_photo.png


Step 4: Check AFTER Metadata

Now analyze the rebuilt image:

  1. Go to exif.regex.info/exif.cgi
  2. Upload rebuilt_photo.png
  3. Click "View Image Data"

Expected results:

┌─────────────────────────────────────────────────────────────┐
│  Jeffrey's Exif Viewer - Results                            │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  Basic Image Info                                           │
│  ├── File Type: PNG                                         │
│  ├── Resolution: 4032 × 3024                                │
│  ├── Color Depth: 8-bit                                     │
│  └── Color Type: RGB                                        │
│                                                             │
│  PNG Chunks                                                 │
│  ├── IHDR (Image Header)                                    │
│  ├── IDAT (Image Data)                                      │
│  └── IEND (Image End)                                       │
│                                                             │
│  ❌ NO EXIF DATA                                            │
│  ❌ NO GPS DATA                                             │
│  ❌ NO XMP DATA                                             │
│  ❌ NO IPTC DATA                                            │
│  ❌ NO THUMBNAIL                                            │
│                                                             │
└─────────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode

Part 4: The Comparison

Side-by-Side Results

Metadata Field Original Photo After CDR
GPS Latitude 37.7749° N ❌ REMOVED
GPS Longitude 122.4194° W ❌ REMOVED
Camera Make Apple ❌ REMOVED
Camera Model iPhone 14 Pro ❌ REMOVED
Serial Number DX3XXXXXXXX ❌ REMOVED
Date Taken 2024-03-15 14:32:07 ❌ REMOVED
Time Zone PST (UTC-8) ❌ REMOVED
Software iOS 17.1 ❌ REMOVED
Aperture f/1.8 ❌ REMOVED
ISO 100 ❌ REMOVED
Embedded Thumbnail Yes (228 KB) ❌ REMOVED
XMP Data 12 fields ❌ REMOVED

Visual Comparison

BEFORE (Original JPEG)              AFTER (Rebuilt PNG)
┌─────────────────────────┐        ┌─────────────────────────┐
│ File: photo_original.jpg│        │ File: rebuilt.png       │
│ Size: 2.4 MB            │        │ Size: 1.8 MB            │
│                         │        │                         │
│ EXIF: 47 fields         │   →    │ EXIF: 0 fields          │
│ GPS: 37.77, -122.41     │   →    │ GPS: (none)             │
│ Device: iPhone 14 Pro   │   →    │ Device: (none)          │
│ Thumbnail: YES          │   →    │ Thumbnail: NO           │
│                         │        │                         │
│ Visual: [Same image]    │   =    │ Visual: [Same image]    │
└─────────────────────────┘        └─────────────────────────┘

       47 metadata fields                 0 metadata fields
Enter fullscreen mode Exit fullscreen mode

Part 5: Why This Matters

5.1 Real Privacy Risks

GPS Coordinates Reveal:

  • Your home address (photos taken at home)
  • Your workplace
  • Your daily routines
  • Your travel patterns
  • Your children's school locations

Timestamps Reveal:

  • When you're away from home
  • Your sleep schedule
  • When you take vacations
  • Alibis (or lack thereof)

Device Info Reveals:

  • Your phone model (for targeted exploits)
  • Your software version (for vulnerability matching)
  • Your device serial number (for tracking)

5.2 Metadata in the News

Incident Year Impact
John McAfee Located 2012 Fugitive found via photo metadata
Vice Journalists 2012 Reporters endangered by photo GPS
Higgins Arrest 2016 Suspect tracked by EXIF data
TikTok Controversy 2020 App collected extensive photo metadata

Part 6: Testing Edge Cases

Test 1: Phone Photo with Location

  1. Take a photo with your phone (ensure location services are on)
  2. Check metadata → should show GPS, device, timestamps
  3. Process through CDR
  4. Verify → all location data should be gone

Test 2: Downloaded Internet Image

  1. Download any image from a website
  2. Check metadata → often contains software info, copyright, dates
  3. Process through CDR
  4. Verify → all web metadata should be gone

Test 3: Screenshot

  1. Take a screenshot on any device
  2. Check metadata → usually minimal, but may include device info
  3. Process through CDR
  4. Verify → what little metadata existed is now gone

Test 4: Edited Photo

  1. Take a photo, edit it (crop, filter, etc.)
  2. Check metadata → may contain edit history, software used
  3. Process through CDR
  4. Verify → edit traces are gone

Part 7: Command Line Tools (Optional)

For power users who prefer command-line tools:

ExifTool (Cross-Platform)

Install:

# macOS
brew install exiftool

# Ubuntu/Debian
sudo apt-get install libimage-exiftool-perl

# Windows
# Download from exiftool.org
Enter fullscreen mode Exit fullscreen mode

View all metadata:

exiftool photo.jpg
Enter fullscreen mode Exit fullscreen mode

Compare before and after:

# Before
exiftool original.jpg > before.txt

# After processing
exiftool rebuilt.png > after.txt

# Compare
diff before.txt after.txt
Enter fullscreen mode Exit fullscreen mode

Sample Output

Before (original.jpg):

ExifTool Version Number         : 12.76
File Name                       : original.jpg
File Size                       : 2.4 MB
MIME Type                       : image/jpeg
GPS Latitude                    : 37 deg 46' 29.64" N
GPS Longitude                   : 122 deg 25' 9.84" W
Camera Model Name               : iPhone 14 Pro
Date/Time Original              : 2024:03:15 14:32:07
Software                        : 17.1
... (47 more fields)
Enter fullscreen mode Exit fullscreen mode

After (rebuilt.png):

ExifTool Version Number         : 12.76  
File Name                       : rebuilt.png
File Size                       : 1.8 MB
MIME Type                       : image/png
Image Width                     : 4032
Image Height                    : 3024
Bit Depth                       : 8
Color Type                      : RGB
Enter fullscreen mode Exit fullscreen mode

Difference: 47+ fields reduced to 5 basic fields (format, dimensions only).


Part 8: What Should Remain vs. What's Removed

Should Be Removed (Privacy/Security):

Category Fields Status After CDR
Location GPS coordinates, altitude, direction ❌ Removed
Device Make, model, serial number ❌ Removed
Software iOS version, app used, edits ❌ Removed
Timestamps Creation date, modification date ❌ Removed
User Info Copyright, author, comments ❌ Removed
Thumbnails Embedded preview images ❌ Removed
XMP Adobe metadata, edit history ❌ Removed
IPTC News/agency metadata ❌ Removed

What Remains (Essential):

Category Fields Status After CDR
Visual Content The actual pixels ✅ Preserved
Dimensions Width and height ✅ Preserved
Color Space RGB/RGBA ✅ Preserved

Conclusion

Using free online tools like Jeffrey's EXIF Viewer, you can:

  1. See exactly what metadata your images contain
  2. Verify that processing actually removes it
  3. Understand the privacy implications

The key insight: true image rebuilding leaves only pixels. No metadata, no hidden data, no traces of the original file structure.

Try it yourself with your own photos. The results will speak for themselves.


Quick Reference

Free Metadata Viewers:

  • Jeffrey's EXIF Viewer: exif.regex.info/exif.cgi
  • ExifMeta: exifmeta.com
  • Jimpl EXIF: jimpl.com/exif

What to look for:

  • GPS coordinates (biggest privacy risk)
  • Device information
  • Timestamps
  • Embedded thumbnails
  • Custom comment fields

After proper CDR:

  • All metadata fields should be empty
  • File should be PNG format
  • Only basic image info (dimensions, color type) remains

📚 Want to Try It Yourself?

If you'd like to test image rebuilding without writing any code, I've put together a step-by-step playground guide:

How to Test Image Rebuilding APIs: A Step-by-Step Guide

It walks you through using the RapidAPI playground to:

  • Upload test images
  • See the processing in action
  • Download rebuilt files for verification

No coding required—just a browser and 5 minutes.


Top comments (0)