  A search for the exclusive decays of the Higgs and $Z$ bosons to a $\phi$ or
$\rho$ meson and a photon is performed with a $pp$ collision data sample
corresponding to an integrated luminosity of up to 35.6 $fb^{-1}$ collected at
$\sqrt{s}=13$ TeV with the ATLAS detector at the CERN Large Hadron Collider.
These decays have been suggested as a probe of the Higgs boson couplings to
light quarks. No significant excess of events is observed above the background,
as expected from the Standard Model. Upper limits at 95$\% $ confidence level
were obtained on the branching fractions of the Higgs boson decays to
$\phi\gamma$ and $\rho\gamma$ of $5.0\times10^{-4}$ and $10.4\times10^{-4}$,
respectively. The corresponding 95$\% $ confidence level upper limits for the
$Z$ boson decays are $0.7\times10^{-6}$ and $4.0\times10^{-6}$ for $\phi\gamma$
and $\rho\gamma$, respectively.
