Photoproduction off nuclei and pointlike photon interactions. I. Cross sections and nuclear shadowing