Einstein’s three miracle papers of 1905 depended on the idea that photons and electrons were particles, which was a heresy within German physics at the time.
It’s a good thing that he was a patent clerk instead of a physicist and that his reasoning was rock solid and backed by experimental results.
Photoelectric Effect.
Also see Compton Effect.