Vigilance allows individuals to escape from predators, but it also reduces time for other activities which determine fitness, in particular resource acquisition. The principles determining how prey trade time between the detection of predators and food acquisition are not fully understood, particularly in herbivores because of many potential confounding factors (such as group size), and the ability of these animals to be vigilant while handling food. We designed a fertilization experiment to manipulate the quality of resources, and compared awareness (distinguishing apprehensive foraging and vigilance) of wild impalas (Aepyceros melampus) foraging on patches of different grass height and quality in a wilderness area with a full community of predators. While handling food, these animals can allocate time to other functions. The impalas were aware of their environment less often when on good food patches and when the grass was short. The animals spent more time in apprehensive foraging when grass was tall, and no other variable affected apprehensive behavior. The probability of exhibiting a vigilance posture decreased with group size. The interaction between grass height and patch enrichment also affected the time spent in vigilance, suggesting that resource quality was the main driver when visibility is good, and the risk of predation the main driver when the risk is high. We discuss various possible mechanisms underlying the perception of predation risk: foraging strategy, opportunities for scrounging, and inter-individual interference. Overall, this experiment shows that improving patch quality modifies the trade-off between vigilance and foraging in favor of feeding, but vigilance remains ultimately driven by the visibility of predators by foragers within their feeding patches.