Yes, the photo has to be taken within last 6 months.so basically it has to be within the last 6 months right? i mean the photo needs to have a 6 month validity from the day it is printed right ?
Following is the link cic mentions about specification.
https://www.canada.ca/content/dam/ircc/migration/ircc/english/information/applications/guides/pdf/5445eb-e.pdf