We use the ring-polymer (RP) representation to quantize the radiation field inside an optical cavity to investigate polariton quantum dynamics. Using a charge transfer model coupled to an optical cavity, we demonstrate that the RP quantization of the photon field provides accurate rate constants of the polariton mediated electron transfer (PMET) reaction compared to the Fermi's Golden rule. Because RP quantization uses extended phase space to describe the photon field, it significantly reduces the computational costs compared to the commonly used Fock states description of the radiation field. Compared to the other quasi-classical descriptions of the photon field, such as the classical Wigner model, the RP representation provides a much more accurate description of the polaritonic quantum dynamics, because it properly preserves the quantum distribution of the photonic DOF throughout the quantum dynamics propagation of the molecule-cavity hybrid system, whereas the classical Wigner model fails to do so. This work demonstrates the possibility of using the ring-polymer description to treat the quantized radiation field in polariton chemistry, offering an accurate and efficient approach for future investigations in cavity quantum electrodynamics.