What do you call a photo like your passport or ID photo?

Solution 1:

Informally, this sort of photograph is called a mugshot:

1 informal A photograph of a person's face made for an official purpose, especially police records.

‘when shown mugshots, the victim was unable to recognize anyone’

1.1 humorous Any photograph of a person's face.

‘a mugshot on the book's cover shows the author’

Lexico from Oxford

Mug is slang for face (as Lexico shows), but even OED is unclear why; it suggests an allusion to Toby jugs, “the drinking mugs made to represent a grotesque human face which were common in the 18th cent.”

Solution 2:

"Photo ID" would be the whole document (ie a passport or driving licence). In the UK they are usually called "passport photo".

Solution 3:

The type of picture used in passports and on other types of photo ID, such as driving licences ('licenses' in USA), identity cards, etc, is often called a 'head and shoulders' portrait.

(c) Each individual identification card shall contain the name of the individual to whom it was issued, his or her date of birth, the class of license, the category or categories to which he or she is licensed, and a head and shoulders picture (passport type) taken within three (3) months prior to the date of issuance of the license.