Measurement of J/psi photoproduction at large momentum transfer at HERA