You can find discussion of this point in section 8.5 in Weinberg's "The quantum theory of fields" vol. 1. The idea is the following:
The true interaction Hamiltonian in QED is
V(t) =-\int d^3x j(x,t)A(x,t) -\frac{1}{2}\int d^3x d^3y \frac{j^0(x,t)j^0(y,t)}{4 \pi|x-y|}
and the true photon propagator is
D_{\mu \nu}(p) = \frac{-i}{(2 \pi)^4} \frac{P_{\mu \nu}(q)}{q^2}
However, results for the S-matrix would not change if you simplify both the interaction and the propagator. In the interaction operator you drop the (current)x(current) term
V'(t) =-\int d^3x j(x,t)A(x,t)
and in the photon propagator you replace the momentum-dependent function P_{\mu \nu}(q) simply by g_{\mu \nu}
D'_{\mu \nu}(p) = \frac{-i}{(2 \pi)^4} \frac{g_{\mu \nu}}{q^2}
Weinberg does not prove that this trick works at all orders, but apparently it works.