  A search for the exclusive hadronic decays $W^{\pm}\to \pi^{\pm}\gamma$,
$W^{\pm}\to K^{\pm}\gamma$ and $W^{\pm}\to \rho^{\pm}\gamma$ is performed using
up to $140\, \text{fb}^{-1}$ of proton-proton collisions recorded with the
ATLAS detector at a center-of-mass energy of $\sqrt{s}=13\,\text{TeV}$. These
rare processes provide a test bench for the quantum chromodynamics
factorization formalism used to calculate cross sections at colliders, as well
as a probe of $W$ boson coupling to quarks and a new way to measure the $W$
boson mass through fully reconstructed decay products. The search results in
the most stringent upper limit to date on the branching fractions
$\mathcal{B}(W^{\pm}\to \pi^{\pm}\gamma) < 1.9\times10^{-6}$,
$\mathcal{B}(W^{\pm}\to K^{\pm}\gamma) < 1.7\times10^{-6}$,
$\mathcal{B}(W^{\pm}\to \rho^{\pm}\gamma) < 5.2\times10^{-6}$ at 95% confidence
level.
