If you are building anything where a photograph is later used as proof — property inspections, insurance claims, delivery confirmation, field service, dispute resolution — the interesting problem is not storage. It is that in two years' time someone adversarial will ask: when was this taken, has it been altered, and is it the same item as the earlier photo?
A plain S3 bucket answers none of those. Here is what actually has to be in the pipeline, and the three things that go wrong in production.
EXIF is evidence and a liability at the same time
The capture timestamp lives in EXIF, which makes EXIF worth keeping. It also carries GPS coordinates, the device serial, the owner's name, and sometimes a thumbnail that was not updated when the image was edited.
The useful split is: parse EXIF on ingest, store the fields you need in your own schema, then strip the blob from the file you serve.
import exifr from 'exifr'; import sharp from 'sharp'; const meta = await exifr.parse(buf, { pick: ['DateTimeOriginal', 'Make', 'Model', 'Orientation'], }); // keep orientation by baking the rotation in, then drop everything const clean = await sharp(buf).rotate().toBuffer(); Two traps. First, sharp discards EXIF by default, orientation included, so an upright photo comes back on its side unless you call .rotate() before writing. Second, do not strip EXIF and then also store the original "just in case" in the same bucket with a predictable key. You have not removed the GPS trail, you have moved it.
Device clocks lie, and the gap is not small
DateTimeOriginal is whatever the capturing device believed the time was. Phones with no signal drift. Cameras are reset to factory defaults. Someone photographs a property at 09:00 local and the file says 04:00 because the device never left UTC. Occasionally a device is simply set wrong by months.
So never store one timestamp. Store three, and label them:
-
captured_at_device— straight from EXIF, untrusted -
captured_at_device_offset— the offset tag if present, null if not -
received_at_server— your clock, at ingest
The one you compute from is received_at_server. The one you show a user is captured_at_device. The one that resolves an argument is the pair, because "device said 04:00, our server received it at 09:12 the same morning" is a coherent story and a single wrong number is not.
If you can, capture the device offset at upload time from the client (new Date().getTimezoneOffset()) and send it alongside. It costs nothing and it turns an unexplainable five-hour gap into a known one.
Identity: the same thing photographed twice
This is the requirement people miss, and it is the one that actually matters when the photos are compared later.
You are not storing images. You are storing observations of an item at a point in time. The item has a stable id that outlives any single visit:
// not this { visitId, photoUrl } // this { itemId: 'kitchen.worktop', visitId, photoUrl, capturedAt } With that, "show me this worktop at check-in and at check-out, side by side" is a query, not a manual hunt through two folders. Without it, a human has to match photos by eye eighteen months later, and that is exactly the moment the comparison needs to be mechanical. I wrote about why that data model matters for inspection software in an earlier post.
Integrity: hash on ingest, not later
Hash the bytes at the moment you receive them, before any processing, and store the digest alongside the record:
import { createHash } from 'node:crypto'; const sha256 = createHash('sha256').update(buf).digest('hex'); This does not prove the photo is of what it claims to be. Nothing in software does. What it proves is that the file served today is byte-identical to the file received on that date, which is the narrower and much more defensible claim. Hash the original, then derive your web-sized variants from it and hash those separately — a resized JPEG is a different file and treating them as interchangeable undoes the point.
If you are ever likely to need more than that, the cheap upgrade is a daily Merkle root of every digest ingested that day, written somewhere append-only. You do not need a blockchain. You need a log that nobody on your team can quietly rewrite.
What this adds up to
Four columns and one hash, decided before launch:
| Field | Source | Trust |
|---|---|---|
captured_at_device | EXIF | low |
device_tz_offset | client at upload | medium |
received_at_server | your clock | high |
sha256 | bytes at ingest | high |
item_id | your schema | high |
None of it is hard. All of it is nearly impossible to retrofit once you have two years of photos keyed by visit and nothing else.
I run Capital Complete Solutions, an AIIC-accredited property inventory and inspection firm in Birmingham, so this comes from the paperwork side rather than the platform side — we produce the reports that get read in deposit adjudications, where the photo comparison is the whole case. The checklist version of what that evidence file needs is free and has no sign-up: capitalcompletesolutions.github.io.
If you are building in this space and want the domain requirements rather than the code, our site lists what the reports actually contain.



