A comprehensive formalism is presented to describe the photo- or electropro
duction of mesons off the nucleon. Taking the hadrons as extended objects d
escribed by form factors, Ne discuss the issues of gauge invariance and of
off-shell form factors (both hadronic and electromagnetic). Specifically, w
e show how the gauge invariance of the production current is preserved by i
ntroducing auxiliary currents which take the place of the exchange currents
usually neglected entirely in practical applications. The relation of the
present formulation to tree-level-type prescriptions is discussed. Applicat
ions to kaon photoproduction are shown.