The photo is only 1/3 of the equation. The other 2/3 are the camera capturing your face again and software recognizing your face, respectively.
Also, not all facial recognition has access to your license/passport photos.
There are techniques to avoid all 3, but avoiding 1/3 is enough.