PRDs
Visa photos
Take your own visa photo on your phone, checked on the spot against the country's rules, and get a file the visa site accepts; Vietnam first.
Summary. A visa application wants a photo that meets exact rules (size, background, no glasses, looking straight), and Vietnam's e-visa site checks it by machine and rejects what fails. Travel lets each person take that photo with their own phone: a live guide frames the face, every rule the site checks is checked first on the phone, and the result is a JPEG made to the rules, saved with the person's other travel documents.
- Vietnam's e-visa first (portrait and passport page), from the portal's own rules, read 2026-10-24 (sources).
- The checks run on the phone (MediaPipe face landmarks, in the browser): the picture never leaves the device until the person saves it.
- Nothing about the face is altered. Travel crops, scales and compresses only; a background that is not white is a retake, not an edit.
- Rules are data: another country is a new entry, not new code.
- First step: the Vietnam portrait end to end, then the passport page.
Status: draft 1, 2026-10-24. Being built (Mike, 2026-10-24: "start with a feature that's not even documented yet ... taking photos of yourself to satisfy various visa requirements, and start with the requirements for Vietnam").
Goals
- A traveler, including the least technical, takes an acceptable visa photo alone with a phone in under five minutes.
- Every problem the visa site would flag is flagged first, beside the photo, with what to change.
- The file meets the site's format rules exactly: dimensions, format and size.
- The photo and its passport page are kept with the person's other documents for the trip.
Non-goals
- Applying for the visa. The person uploads the files on the official site themselves.
- Retouching: changing the background, skin, eyes or anything else in the face. The portal rejects photos "captured from another source", and editing is the likeliest way to look like one.
- Printed photos. A 4x6 print layout can come later (see Open questions).
Where things stand
- Vietnam's rules are recorded with quotes and dates in Vietnam visa photos: what the official sources say.
- Travel already has owner-only uploads (JPEG typed from its bytes) and per-person records; this feature stores through them.
How it works
The flow
- Choose the photo: a country and a document (Vietnam, e-visa portrait; or Vietnam, passport data page). The page lists that document's rules in plain words.
- Take it: the camera opens (front camera by default, or the back one for someone else to take it) with an outline where the head goes. Live hints say what to change ("Move back", "Look straight at the camera", "More light on your face") until everything is green, then a three-second countdown takes the picture. Uploading an existing photo works too.
- See the result: the photo as it will be sent, cropped to 4:6, with each rule passed or failed beside it, and what to do about any that failed.
- Confirm what a camera cannot check: no glasses, no hat (religious head covering allowed with the face fully visible), polite clothes, taken today.
- Save and download: saved to the person's uploads as a visa photo with its check results; downloaded as a JPEG ready for the portal.
The rules, as data
A requirement set names a country, a document, and its rules. Each rule says what it checks, its source (official, or Travel's own guidance where official sources say nothing), whether it fails or only warns, and how it is checked: measured on the photo, or confirmed by the person.
Vietnam e-visa portrait:
| Rule | Value | Source | Checked |
|---|---|---|---|
| Size | 4 x 6 cm (aspect 2:3) | official | made so |
| File | JPEG, at most 2 MB | official | made so, and refused on save if not |
| Pixels | 945 x 1417 (600 dpi) | Travel | made so |
| One face | exactly one | official (portal check) | measured |
| Looking straight | head turned or tilted at most 8 degrees | official (portal check) | measured |
| Face large enough | head at least 425 camera pixels tall, so the photo is at most a 2x enlargement | official (portal check), Travel's figure | measured |
| Head size | head 50 to 70 percent of the height, centered | Travel | measured, warns |
| Eyes open, mouth closed | guidance | measured, warns | |
| White background | bright, unsaturated, even, measured around the head in the whole camera frame | official | measured |
| Sharp and well lit | no blur, no strong shadow across the face | official ("image quality") | measured |
| No glasses | official | confirmed by the person | |
| No hat | religious covering allowed | official | confirmed by the person |
| Polite clothes | official | confirmed by the person | |
| Recent | taken within six months | official ("recent"), Travel's six months | confirmed; a new photo is today's |
Vietnam e-visa passport data page: JPEG at most 2 MB; the whole page with all four corners; the photo and the machine-readable lines readable; flat, no glare. Checked by an outline to fit the page in, a sharpness and glare check, and the person's confirmation; reading the MRZ on the phone comes later.
Checks on the phone
The browser runs MediaPipe's face landmarker (@mediapipe/tasks-vision, its model file served from Travel itself). It gives each face 478 points, the head's rotation, and expression scores, from which come: the number of faces, the head's yaw, pitch and roll, the head's size and position, whether the eyes are open and the mouth closed. Background, light and sharpness are measured on the pixels: brightness and color around the head (in the whole camera frame, which shows more wall than the crop; too little wall is a warning to step back), the difference between the face's two sides, and edge contrast in the face. MediaPipe needs WebGL; a browser without it is told so and asked to use a phone's Chrome or Safari. Nothing is sent anywhere to be checked.
Saving
Saving uploads the made JPEG through Travel's uploads (owner-only, typed from its bytes) and records a visa photo: whose, which requirement set, the check results, and when. The server checks again what it can on its own (JPEG, dimensions, size) and refuses a file that breaks the format rules. The Visa photos page lists a person's saved photos by trip document, with Download.
Phasing
- Vietnam portrait (this draft): requirement data, live camera with hints, result checks, save and download.
- Vietnam passport page: page outline, glare and sharpness, confirmation.
- More countries as trips need them, each a requirement set with its sources page.
- On a trip: each traveler's visa photos listed under the trip's documents (the main PRD's 4.6).
Risks
- The portal's checks are a black box. Travel's checks are modeled on its messages, not its code. Mitigated by keeping thresholds conservative and testing with a real application before the December trip.
- Phones differ. Front cameras on older phones are soft and dark. Mitigated by the light and sharpness checks, and by the back-camera mode for someone else to take it.
- The model file is 3.6 MB. Loaded only on the photo page, cached after the first time.
Open questions
Answer each question in place; your answers are saved for everyone reading this page.
What happens when the background is not white? See The rules, as data.
Should Travel also make a sheet for printing 4x6 photos (for the paper form NA1 or visa on arrival)? See Non-goals.
Which countries come next? See Phasing. Answer with country names, most urgent first.
Comments
Loading comments...