When you detect a photon, you can say where, when, and with what frequency it arrived, but before the measurement, these parameters are undefined. The photon’s existence is embodied in a wave function, which gives the probability of measuring the photon at any time, place, and frequency. The wave function for a single photon is usually a “wave packet”–nearly zero everywhere except in a narrow range of space and time. But as long as you don’t detect the photon directly, you can manipulate its wave function into any complicated shape, in theory.