Taking pictures of recruits at the time of enlistment is a practice that probably began a century or so after the war. We don't see pictures attached to U.S. service files from WWI -- I'm not sure about WWII since so many of those records have been destroyed.