Interstate 66 is seen in Virginia near Manassas in this file photo. (Stephanie K. Kuykendal/For The Washington Post)

Smiling is back in favor at the Virginia Department of Motor Vehicles.

After six years of telling residents to keep a straight face in their driver’s license photos, the DMV has reversed course and is telling drivers to bring on their goofiest grins.

“We agree with Buddy the Elf — smiling is wonderful,” the department posted on its Facebook page.

But the turnabout wasn’t caused by Buddy, the character made popular in the movie “Elf,” who spread his child-like joy among workers. No, it’s all about advances in technology.

In 2009, the agency considered adding facial-recognition software to prevent identity theft and as a way of more easily identifying drivers. The commonwealth decreed that those seeking a driver’s license or official form of identification must have a “neutral expression” in their photos.

An expressionless face would allow the software to compare similar images, officials said at the time. That meant drivers could smirk — a little — but not too much.

“You could smile slightly, but not show teeth,” said Brandy Brubaker, a spokeswoman at the DMV. “If you could turn the corners of your mouth up without showing teeth, that was fine. But not a big, toothy grin.”

Well, it seems there wasn’t much to smile about under that policy.

Lots — and lots — of Virginia drivers complained at its 75 centers around the state when told by customer-service agents they weren’t “permitted to smile,” Brubaker said.

And because Virginians have to take new driver’s license photos only every 16 years, they potentially have to carry around a mean-looking mug for a long time.

The DMV never used the software. And technology has advanced to the point that neutral expressions are no longer necessary, department officials said.

They said they have a secure process for issuing identification and driver’s licenses, according to Brubaker.

Virginia is not alone in switching its policies of smiles vs. no smiles on driver’s license photos, according to security experts and motor vehicle administrators.

Experts say smiles no longer matter when it comes to comparing images of people.

Facial-recognition software can now analyze such details as a person’s chin, eyebrow shape, skin texture, the lines of a jawbone, corners of a mouth or the shape of an eye — and even create a 3-D model that combines all of those features.

“The human face is always changing,” said Alvaro Bedoya, executive director at the Center on Privacy & Technology at Georgetown Law. “It is not permanent.”

“Smiles used to matter a lot ,” he said. “But now technology has moved beyond that to where smiles don’t matter.”

In Maryland and in the District, drivers can smile in their driver’s license photos. Maryland motor vehicle department officials said it is possible that could change to help improve security.

Virginia officials boast that its driver’s licenses and ID cards are “among the most secure” in the country. They say that their identifications are made in a secure facility and “incorporate security printing, polycarbonate card construction, and laser-engraved data and photos, among other features.”

The change in smile policy has sparked plenty of comments on social media.

Leroy Jenkins wrote on Facebook, “Have you moved pass Civil War era cameras? Now you can smile?” Another commenter — Ginger Edwards — thanked the department, noting “I look like a mean prisoner in mine. I’m ashamed to show it as my ID.” And Amie Santos wrote, “Thank goodness!!!! No more HORRIBLE ID for me . . .!”

Virginians who hate their stone-faced driver’s license photos can pay $20 and get their photos retaken. For a new identity card, the cost is $10.

There hasn’t been an onslaught of people paying to have their photos changed on their licenses — at least not yet, according to motor vehicle officials.

“We’ve been telling people they can’t smile for a couple of years now,” said Brubaker at the Virginia DMV. “This is a little holiday gift you can give yourself if you don’t like your photo.”

We agree with Buddy the Elf — smiling is wonderful. Virginia drivers can now smile in driver’s license and ID card photographs thanks to improvements in technology. http://ow.ly/Wbttl