From direct observations of the longitudinal development of ultra-high energy air showers performed with the Pierre Auger Observatory, upper limits of 3.8%, 2.4%, 3.5% and 11.7% (at 95% c.l.) are obtained on the fraction of cosmic-ray photons above 2, 3, 5 and 10 EeV (1 EeV ≣ 1018 eV), respectively. These are the first experimental limits on ultra-high energy photons at energies below 10 EeV. The results complement previous constraints on top–down models from array data and they reduce systematic uncertainties in the interpretation of shower data in terms of primary flux, nuclear composition and protonair cross-section.