The photo was part of Ralph Northam's 1984 yearbook during his last year at Eastern Virginia Medical School. 
The prohibition was mandated by Congress as part of a broader defense bill signed into law last year.