There are two camps: one that says you need a photo on the resume and the other, which says you shouldn't use it:
If the employer later interviews you but doesn't hire you, it opens the possibility of a discrimination claim. Some companies will even flat-out reject resumes with photos, just to avoid that potential accusation. That's one reason some ATS solutions remove photos from resumes, leaving only the text.
The camp that stands for using the photo on the resume says that experts worry too much. Trying to get acquainted with a person without knowing what he/she looks like goes against nature. For example, LinkedIn profiles without photos are exactly the ones evaluated as unprofessional.
If you choose to put a photo on a resume, target it just as you do the rest of your resume. Your photo should comply with the company's values and culture.
We recommend you to have two separate photos – formal and informal. Use a formal photo if the company is a big corporation with a more official environment and use an informal photo if your desired company has a more relaxed environment. Your photo background should be clean and uncluttered.
Whatever you choose, either to put a photo or not, don't spend too much time thinking about it. A content on a resume is a core.