Just like when you go to a job interview, the first impression you give a professional connection or a recruiter on LinkedIn matters the most. Your photo is an integral part of your profile and, along with your employment history and other credentials, markets you as a strong prospective employee or a solid networking connection.
With the capabilities we have on smartphones or friends who love photography with fancy cameras, you can get a perfect photo. If you are choosing from ones, you already have, be very selective. It needs to be recent enough so that people recognize you when they see you in an interview or meeting situation, so less than two years old.