According to here:
https://www.canada.ca/en/immigration-refugees-citizenship/services/new-immigrants/pr-card/apply-renew-replace/photo.html
Glasses may be worn in photos as long as the eyes are clearly visible and there is no glare in the glasses.
Sunglasses and tinted eye glasses are unacceptable.