# Deriving a general gauge-invariant photon propagator

My understanding is that for a $$U(1)$$ gauge field $$A_\mu$$, the most general gauge-invariant kinetic term in the Lagrangian that can be written down which satisfies gauge invariance is something of the form $$\Pi(p^2) (p^2 \eta_{\mu\nu} - p_\mu p_\nu) A^\mu A^\nu$$ (with the usual Yang-Mills action coming from a constant $$p$$). Normally with Yang-Mills, there is a subtlety in inverting this equation to derive the propagator, as it has a zero eigenvalue. The usual way to fix this is to introduce a gauge-fixing term $$\frac{1}{2\xi} (\partial_\mu A^\mu)^2$$ to the Lagrangian. My question is essentially, are there any further subtleties that arise in our inversion when we have the general form of the propagator? In other words, can we simply introduce a term like $$\frac{1}{2\xi}\Pi(p^2) (p_\mu A^\mu)^2$$ as a gauge-fixing term and carry out the inversion the same as before?