This paper presents a study of $WW\gamma $ and $WZ\gamma $ triboson production using events from proton?proton collisions at a centre-of-mass energy of $\sqrt{s} = \text{8}\,\text{TeV}$ recorded with the ATLAS detector at the LHC and corresponding to an integrated luminosity of 20.2 fb$^{-1}$ . The $WW\gamma $ production cross-section is determined using a final state containing an electron, a muon, a photon, and neutrinos ( $e\nu \mu \nu \gamma $ ). Upper limits on the production cross-section of the $e\nu \mu \nu \gamma $ final state and the $WW\gamma $ and $WZ\gamma $ final states containing an electron or a muon, two jets, a photon, and a neutrino ( $e\nu jj\gamma $ or $\mu \nu jj\gamma $ ) are also derived. The results are compared to the cross-sections predicted by the Standard Model at next-to-leading order in the strong-coupling constant. In addition, upper limits on the production cross-sections are derived in a fiducial region optimised for a search for new physics beyond the Standard Model. The results are interpreted in the context of anomalous quartic gauge couplings using an effective field theory. Confidence intervals at 95% confidence level are derived for the 14 coupling coefficients to which $WW\gamma $ and $WZ\gamma $ production are