Gauge-invariant meson photoproduction with extended nucleons