Is a visa photo the same as a passport photo?
Sometimes, and the exceptions are expensive. The same government can run two different specifications for its two applications, and the one country where that gap is widest is not the one most people expect.
Canada, where they are simply different
A Canadian passport photo is 50 by 70 mm. A Canadian visa photo is a minimum of 35 by 45 mm. Same country, same department, two shapes that cannot be cropped into each other. The face measurement happens to be nearly identical, 31 to 36 mm in both, which is what makes the mismatch easy to miss: the head looks right and the frame is wrong.
The United States, where the size matches and the file does not
Both are 2 by 2 inches square, so a print made for one fits the other. The digital rules diverge sharply. A passport upload accepts 54 KB to 10 MB, while the DS-160 visa form stops at 240 KB. A file that sailed through the passport renewal is roughly forty times over the visa limit, and the form will not tell you that.
The United Kingdom, where they genuinely are the same
The UK runs one standard across both: 35 by 45 mm printed, at least 600 by 750 pixels digitally, 50 KB to 10 MB. The only thing to check separately is age, because a passport application asks for a photo taken in the last month while six months is normal elsewhere.
The rule of thumb, and why it is only a rule of thumb
If both documents are issued under ICAO Doc 9303 at 35 by 45 mm, one photo usually serves both. The moment either side departs from that, and Canada, the US, India, Turkey and China all do, the assumption breaks. Checking the two specifications takes a minute and is cheaper than an appointment.
Questions
Can I use my passport photo for a visa application?
Often, but not always. It works where both use the same size and file limits. It fails for Canada, where the passport is 50 by 70 mm and the visa is 35 by 45 mm, and it fails for a US DS-160 if the file is over 240 KB.
Why does Canada use two different sizes?
The passport and the visa are separate applications with separately published specifications. There is no rule that they align, and in Canada's case they do not.
Is a US visa photo the same as a US passport photo?
The same 2 by 2 inch square, yes. The digital limits are not: the DS-160 caps at 240 KB against 10 MB for a passport upload.
What about the UK?
The UK uses one photo standard for both. Check the recency rule separately, because the passport application wants a photo from the last month.