How SortMyPics Organizes Your Photos
Four steps. Seven AI stages. Zero uploads. Here's exactly what happens when you run SortMyPics on your photo library.
The Four Steps
From selecting your folder to having a fully organized photo library, the whole process takes minutes — not hours.
-
Select Your Source Folder
Click "Select Folder" in SortMyPics and choose the folder (or drive) where your unsorted photos live. SortMyPics uses the browser's File System Access API to open a native folder picker — the same dialog you'd see in any desktop app.
You grant read-only access. SortMyPics cannot write, delete, or modify anything in your source folder. It only reads the files.
No files are uploaded. No network connection is needed at this stage. The browser reads your files directly from disk into local memory.
Supported browsers: Chrome 86+ and Edge 86+ are required for the File System Access API. Firefox and Safari do not currently support this API. -
AI Analyzes Your Photos — 7 Stages
This is the core of SortMyPics. Once your folder is selected, the AI pipeline runs automatically through seven sequential stages.
Stage 1CLIP Trash Detection
The CLIP model scans every file and calculates a confidence score for "screenshot", "receipt", "document", and "blurry photo". Files that score above a threshold are flagged as trash and excluded from the sorted output. They're placed in a separate
_reviewfolder so you can check them manually if you want.This stage means your organized library won't be cluttered with app screenshots, scanned invoices, or accidental camera taps.
Stage 2EXIF Metadata Reading
For every photo that passes trash detection, SortMyPics extracts the EXIF metadata embedded in the file. The key fields are:
- DateTimeOriginal — the exact date and time the photo was taken
- GPS coordinates — latitude and longitude from your device's location sensor
- Camera model — used to distinguish between devices if you're sorting photos from multiple sources
If EXIF data is missing or corrupt, the file's last-modified timestamp is used as a fallback for dating.
Stage 3Session Clustering
Photos are grouped into sessions based on time gaps. Any two consecutive photos with a gap of 4 hours or less are placed in the same session. A gap larger than 4 hours starts a new session.
This mirrors how humans naturally think about their photos: a day in Rome, an afternoon birthday party, a weekend camping trip. Sessions are the building blocks that all subsequent stages work with.
A typical library of 5,000 photos might produce 80–200 distinct sessions depending on how actively they were shot.
Stage 4Reverse Geocoding
For sessions that have GPS data, SortMyPics takes the median GPS coordinate of the session and sends a single reverse geocoding request to the OpenStreetMap Nominatim API. The response returns a human-readable place name: "Florence, Italy" or "Brooklyn, New York".
This place name is later used both for trip detection and for generating the folder name. Only one API request is made per session (not per photo), and the data sent is nothing more than a pair of decimal coordinates.
Sessions without any GPS data are geocoded as "Unknown Location" and named based purely on content tags.
Stage 5Content Tagging
CLIP runs again — this time to understand the subject matter of each photo. For each session, SortMyPics builds a content tag profile by classifying a representative sample of photos against 15 categories:
The top 2–3 tags for a session are passed forward to the Gemini naming stage.
Stage 6Trip Detection
When you first set up SortMyPics, you enter your home city. SortMyPics compares the geocoded location of each session against your home city. Sessions where the location is outside your home city (or its immediate metro area) are classified as trips. Sessions in or near your home city are classified as local events.
This distinction affects both the folder structure (trips get a "Trip" label) and how Gemini names them — a local wedding and a destination wedding both get useful names, but they're clearly distinguished in your library.
Sessions with no GPS data default to "local event" unless other signals (like airport content tags) suggest travel.
Stage 7Gemini AI Naming
The final stage turns all the structured data — date, location, content tags, trip or local classification — into a friendly folder name. SortMyPics sends a short text prompt to the Google Gemini API. The prompt looks something like:
"Generate a concise, human-readable folder name for a photo session. Date: August 2025. Location: Santorini, Greece. Content: beach, food, sightseeing. Type: Trip. Examples: 'Santorini Trip', 'Summer in Greece'."
Gemini responds with a name like "Santorini Summer Trip". This becomes the last part of the folder path:
2025/08 - Santorini Summer Trip/.No photos are sent to Gemini. Only the structured text prompt is transmitted. If Gemini is unavailable or the API call times out, SortMyPics uses a fallback name built from the location and content tags.
-
Review the Proposed Folder Structure
Before a single file is copied, SortMyPics presents the full proposed output structure in a collapsible tree view. You can see every folder that will be created and every photo that will go into it.
If a folder name looks wrong, you can rename it inline before confirming. If a photo ended up in the wrong session, you can reassign it. The preview is fully interactive.
This review step means you're always in control. SortMyPics suggests; you decide.
Typical output structure:
2024/
07 - Rome Trip/
08 - Beach Holiday/
12 - Christmas at Home/
2025/
01 - New Year Party/
06 - Wedding Berlin/ -
Confirm & Copy
When you're happy with the structure, click "Confirm". SortMyPics asks you to select an output folder — this is where the organized copies will be created. SortMyPics uses the File System Access API with read-write access only to this output folder.
Your source photos are never touched. SortMyPics copies each file into its new location in the output folder. If a file already exists in the output (same name and size), it's skipped — so you can run SortMyPics multiple times without duplicating files.
A progress bar shows the copy status. When it's done, you'll see a summary: how many photos were sorted, how many sessions were created, and how many files were flagged for review.
Safe to run repeatedly: SortMyPics's copy logic is idempotent. Run it on the same source folder multiple times and you won't end up with duplicates.
Technical Architecture
For the technically curious: here's how SortMyPics's AI pipeline is built.
CLIP via Transformers.js
SortMyPics uses the Xenova/clip-vit-base-patch32 model, a quantized version of OpenAI's CLIP optimized for browser inference. It runs through Hugging Face's Transformers.js library, which compiles the model to ONNX format and executes it via WebAssembly.
The model (~350MB) is downloaded from Hugging Face's CDN on first use and cached in the browser's Cache Storage API. Subsequent uses are fully offline — no network connection needed for AI inference.
File System Access API
The File System Access API (available in Chrome 86+ and Edge 86+) allows web applications to read and write files on the user's device with explicit permission. SortMyPics requests read-only permission for the source folder and read-write permission only for the user-selected output folder.
Permissions are scoped and revocable. You can revoke SortMyPics's access at any time from your browser's site settings.
Google Gemini API
Gemini is used exclusively for generating human-readable folder names. A single API call is made per session, containing only a structured text prompt (date, location string, content tags). No images, no filenames, no personal data beyond city-level location.
The Gemini API key is managed server-side by SortMyPics — your key is never stored in your browser or exposed to the client.
OpenStreetMap Nominatim
Reverse geocoding (GPS coordinates → place names) is handled by the OpenStreetMap Nominatim API. This is a free, public API that requires no account or API key. Requests are made directly from your browser to Nominatim — they do not pass through SortMyPics's servers.
Questions About the Process
How long does it take to sort 10,000 photos?
Processing speed depends on your computer's CPU and whether your browser can use GPU acceleration. On a modern laptop, expect roughly 2–5 photos per second for the CLIP analysis stage. A library of 10,000 photos would take approximately 30–90 minutes for the AI analysis. The actual file copying after confirmation is much faster — limited only by your disk speed.
What happens if a photo has no EXIF date?
SortMyPics falls back to the file's last-modified timestamp. If that's also unreliable (for example, a photo that was downloaded from the internet), the file is placed in an _undated folder for manual review. It won't be lost — just flagged for your attention.
What if I have photos from multiple cameras or devices?
SortMyPics handles mixed sources naturally. The session clustering algorithm groups photos by time, regardless of which device they came from. If you took photos on your iPhone and your partner took photos on their Android on the same day, those photos will likely be grouped into the same session and sorted into the same folder.
Can I run SortMyPics on a NAS drive or external hard drive?
Yes, as long as the drive appears as a local drive in your operating system and you can access it through the native file picker. SortMyPics reads files the same way regardless of whether they're on an internal SSD, an external USB drive, or a network-attached storage device mounted as a local drive.
Does SortMyPics keep a record of my photos or folder structure?
No. SortMyPics does not store or transmit your folder names, file names, or any metadata about your photos. The only external API calls are the geocoding requests to OpenStreetMap (GPS coordinates only) and the Gemini naming requests (structured text descriptions, no filenames or photo content).
See It In Action
Stop putting off organizing your photos. SortMyPics handles thousands of photos in minutes.
Get SortMyPics for €9.99 →One-time purchase. Works on Windows, Mac, and Linux.