A search for narrow low-mass resonances decaying to quark-antiquark pairs is presented. The search is based on proton-proton collision events collected at 13 TeV by the CMS detector at the CERN LHC. The data sample corresponds to an integrated luminosity of 35.9 fb(-1), recorded in 2016. The search considers the case where the resonance has high transverse momentum due to initial-state radiation of a hard photon. To study this process, the decay products of the resonance are reconstructed as a single large-radius jet with two-pronged substructure. The signal would be identified as a localized excess in the jet invariant mass spectrum. No evidence for such a resonance is observed in the mass range 10 to 125 GeV. Upper limits at the 95% confidence level are set on the coupling strength of resonances decaying to quark pairs. The results obtained with this photon trigger strategy provide the first direct constraints on quark-antiquark resonance masses below 50 GeV obtained at a hadron collider.