The ePhoto code for French documents: a guide for Moroccans abroad
An ePhoto code is a 22-character code issued with an approved digital photo, required by the French administration for residence permit (ANEF), driving licence (ANTS), DCEM and titre de voyage applications. It is single-use, valid for 6 months and cannot be swapped between ANTS and ANEF. The photo is 35×45 mm on a light, non-white background.
Every summer, Moroccans living in France come into our shop in Tiznit with the same question: “I need a photo with a code to renew my residence permit — can it be done here?” For many online applications the French administration no longer accepts a paper photo alone; it asks for a digital photo with an ePhoto code. This guide explains what the code is, which documents need it, and how to use it without wasting it.
What is an ePhoto code?
An ePhoto code, in French code photo-signature numérique, is a 22-character alphanumeric code issued with your photo. It links your digital photo and signature to your online application, so you don’t need to scan or post the photo. When you enter the code in the application, the administration retrieves your photo directly from the system.
You get the code from a photographer, photo booth or app approved for the service, usually printed on the photo sheet and sent by email right after the photo is taken.
Which documents need it?
| Document | Platform |
|---|---|
| Residence permit (titre de séjour) and renewals | ANEF |
| French driving licence (first licence, renewal, loss…) | ANTS |
| Travel document for foreign minors (DCEM) | ANEF |
| Titre de voyage (travel document for refugees and some other cases) | ANEF |
Always choose the correct document type when ordering the code, because ANTS and ANEF do not allow codes to be exchanged: a code taken for a driving licence won’t work for a residence permit.
Rules you need to know
- Single use: each code works for one application only. Two applications (say, a residence permit and a driving licence) need two codes.
- Valid for 6 months: after that the code is refused and you need a new photo.
- Copy the code, don’t type it: 22 characters means a high risk of typos. Copy it from the email and paste it into the field.
- Keep the email and the sheet until your application is finally accepted.
These rules are printed on the receipt that comes with every code, and explained in guides such as Legalstart’s guide to the digital photo-signature.
The photo itself
The photo follows French document photo standards:
- 35×45 mm, with the face from chin to top of head between 32 and 36 mm.
- A plain light background (light grey or light blue). White backgrounds are not accepted for French documents, unlike many visas.
- A neutral face, mouth closed, eyes open and head straight.
- Take off your glasses.
- Hair behind the ears, not covering the eyes or the sides of the face.
- A well and evenly lit face, with no shadow across half of it.
- No head covering except where the administration allows it.

These are the same tips the ePhoto app shows before every photo: a well-lit face, mouth closed with no smile, glasses off, and hair behind the ears. The app also has an option for medical situations that make the photo difficult (disability, strabismus, facial paralysis…).
Photos of babies and children under 3
Young children have a dedicated option in the app, and the photo is taken by an adult. The rules:
- Lay the baby on a sheet or in front of a plain, light background, and take the photo from directly above the face. Don’t photograph the baby in someone’s arms or on a patterned blanket.
- The child must be alone in the photo: no visible hand, toy, dummy (pacifier), hat or headband. The head is bare, with no accessories.
- Mouth closed and a neutral expression. For very young babies, the administration may tolerate a slightly open mouth.
- Head straight and looking at the lens. Holding the phone directly above the face helps the baby look straight up. For very young babies, a less steady gaze may be tolerated.

From our experience at the shop: baby photos work best when the child is fed and calm, and when we shoot quickly during a quiet moment rather than making many tiring attempts.
Getting a code while you are in Morocco
You don’t have to wait until you are back in France. At Photo Labo El Mechouar in Tiznit we do ePhoto photos through the ePhoto app:
- Tell us the document: residence permit, driving licence, DCEM or titre de voyage.
- We take the photo to the French standards, on a suitable light background.
- You get your ePhoto code immediately, plus printed photos if you need them.
- You enter the code in your ANEF or ANTS application from your phone or computer.
Mistakes that waste a code
- Choosing the wrong document type when ordering the code.
- Typing the code by hand with one wrong character.
- Using the same code for two applications.
- Applying more than 6 months after the photo.
- A white background or a smile, which the system rejects.
Frequently asked questions
Do I need an ePhoto code for a Moroccan passport or ID card?
No. The ePhoto code is for French documents. Moroccan documents have their own standards: see visa and document photo sizes.
Does the code work for a French (Schengen) visa?
No. French visas are applied for through the visa centre with a printed photo. See Schengen visa photo.
I lost my code — what now?
Search your email first. If you can’t find it, the simplest option is a new photo with a new code, especially if the old one was close to expiring.
How long does it take to get the code?
A few minutes: you receive the code right after the photo is taken.
Sources
- Legalstart: digital photo-signature
- Information shown in the ePhoto app we use at the shop
We review this information regularly, but requirements can change: always check with the official authority before you apply.