No, it's not illegal, even if they get your license plate in the picture, despite what some of the answers have suggested. If the picture was taken in a public place, then it is completely legal and they do not have to have your permission for using it how they see fit.
It's illegal in NH for officials to use any electronic surveillance to identify you or your vehicle, unless specifically authorized by law, or for investigation of a particular crime, for viewing traffic conditions (but not recording), incidental to surveillance of a public building, bridge or to implement the EZ-pass toll system.
The use of automated number plate scanning devices is also prohibited, except IAW the above.
Your state and local laws may have something similar.