The tensor-pomeron model is applied to low-x deep-inelastic lepton-nucleon scattering and photoproduction. We consider c. m. energies in the range 6 -318 GeV and Q 2 < 50 GeV 2 . In addition to the soft tensor pomeron, which has proven quite successful for the description of soft hadronic high-energy reactions, we include a hard tensor pomeron. We also include f 2 -reggeon exchange which turns out to be particularly relevant for real-photon-proton scattering at c. m. energies in the range up to 30 GeV. The combination of these exchanges permits a description of the absorption cross sections of real and virtual photons on the proton in the same framework. In particular, a detailed comparison of this two-tensor-pomeron model with the latest HERA data for x < 0.01 is made. Our model gives a very good description of the transition from the small-Q 2 regime where the real or virtual photon behaves hadron-like to the large-Q 2 regime where hard scattering dominates. Our fit allows us, for instance, a determination of the intercepts of the hard pomeron as 1.3008 ( +73 −84 ), of the soft pomeron as 1.0935 ( +76 −64 ), and of the f 2 reggeon. We find that in photoproduction the hard pomeron does not contribute within the errors of the fit. We show that assuming a vector instead of a tensor character for the pomeron leads to the conclusion that it must decouple in real photoproduction.