Drop your photo, get a passport-shape JPG under the official 500 KB cap — the visa.immigration.go.tz upload format. The crop and compression run in your browser; the photo never leaves your device.
Tanzania's official eVisa portal (visa.immigration.go.tz, Immigration Services Department — it covers mainland Tanzania and Zanzibar) publishes its photo spec right in its own Visa Application Guidelines: the photo must be coloured, on a plain background, showing an unmounted full face from top of hair to bottom of chin, eyes open, natural expression, no distracting shadows. The file rules: the photo should not exceed 45 mm × 35 mm (a standard passport shape), the file should not exceed 500 KB, and the format must be JPG or JPEG. The guidelines end with a warning that noncompliance may cause rejection. This page presets that spec: drop your photo and PixFit center-crops it to the 35:45 passport shape, keeps it under 500 KB, and gives you a JPG the portal accepts.
The official spec is in millimetres (45 length × 35 width) and kilobytes; the portal publishes no pixel dimensions. This page suggests 700×900 pixels simply because it's the same 7:9 shape with comfortable resolution — it is not an official number, and any similar passport-shape size well under 500 KB works. If your photo is already passport-shaped, you can clear the Exact size field and just let the compressor handle the 500 KB cap. There is also no minimum file size, so nothing needs padding.
The official guidelines say it in one sentence: if the applicant regularly wears eyeglasses, he/she is allowed to take a photo with his glasses on. Several unofficial “Tanzania eVisa” sites confidently claim the opposite (“glasses are not permitted, even clear/prescription frames”) — they're wrong on the official portal's own text. Head coverings are the stricter rule: not permitted except for religious reasons, and even then the face from bottom of chin to top of forehead and both edges of the face must be clearly visible.
Search results for this spec are full of invented numbers from lookalike domains: one sells “white background, minimum 300×300 pixels, maximum 2 MB”, another lists “up to 600 dpi” with .pdf/.gif/.bmp/.png among accepted formats, a third says “40×45 mm, no more than 300 KB”. The official guidelines say none of that: plain background (not necessarily white), 35×45 mm, 500 KB, JPG/JPEG only, no pixel or dpi figure at all. As always, if the upload screen in front of you shows different numbers, the portal wins — check the current text at the official guidelines page linked below.
Alongside the photo, every application needs a copy of your passport's biographic data page (a flat, glare-free scan or photo — make sure the machine-readable lines at the bottom are legible) and, for ordinary visits, a return ticket; business and other visa classes add their own documents. The flow runs through the portal: fill the form, upload the photo and documents, receive a payment notification, pay the fee, submit — you get a User Identification Number by email to track the application.
Two pieces of official advice worth repeating: applicants whose nationality falls under the referral case catalogue are advised to apply at least two months before their travel date, and the guidelines explicitly advise not to purchase tickets or make reservations until the visa is approved. Neither is a photo rule, but both save real money if they apply to you.
The official application site is visa.immigration.go.tz, with the photo spec in its Visa Application Guidelines — the space around it is crowded with lookalike sites charging a markup on the same form (several of the wrong specs above come from exactly those sites), so type the address rather than clicking an ad. And a visa photo travels with your passport details, so it shouldn't detour through a resizer's server: PixFit re-encodes entirely in your browser, nothing is uploaded, and the re-encode strips EXIF metadata (including GPS) as a side effect. An iPhone HEIC can be dropped straight in — it comes out as the JPG the portal wants. For other countries' formats, see the Ethiopia e-Visa, India e-Visa and Vietnam e-Visa pages, or the full verified table.