Earlier measurements at LEP of isolated hard photons in hadronic Z decays, attributed to radiation from primary quark pairs, have been extended in the ALEPH experiment to include hard photon productioninside hadron jets. Events are selected where all particles combine democratically to form hadron jets, one of which contains a photon with a fractional energyz≥0.7. After statistical subtraction of non-prompt photons, the quark-to-photon fragmentation function,D(z), is extracted directly from the measured 2-jet rate. By taking into account the perturbative contributions toD(z) obtained from anO(ααs) QCD calculation, the unknown non-perturbative component ofD(z) is then determined at highz. Provided due account is taken of hadronization effects nearz=1, a good description of the other event topologies is then found.