In headwater streams, riparian leaf litter is the primary food source for detritivores. While it is well known that aquatic fungi improve the nutritious quality of leaves, our understanding on whether and how benthic algae influence this process remains limited. Here, we hypothesized that the interplay between algae and fungi, termed “algal priming”, further enhances food quality. In a 40‐d microcosm experiment, we fed Gammarus fossarum of two size classes with Fagus sylvatica leaves of varying qualities: pure leaves (low quality), leaves colonized by fungi (intermediate quality), and leaves colonized by fungi in the presence of a diatom (high quality). Our results revealed that Gammarus' ingestion rates increased (55–164%) with food quality, spurring accelerated growth (4–14%), regardless of the size class. Furthermore, we observed a tendency for Gammarus' overall fatty acid (FA) quantity to rise with higher‐quality food (12–318%), with the FA profile exhibiting increased proportions of specific polyunsaturated FAs that are essential for detritivores. These observations can likely be attributed to leaf‐associated fungi, which are more readily assimilated than the leaves and are known as a source of FA. This enhancing effect by fungi was further amplified in the presence of diatoms, presumably through the positive effect of algal‐derived labile organic carbon, which supports fungal growth. Despite reduced autochthonous primary production in shaded headwater streams, the experimental findings from this study indicate a potential of enhanced secondary production and energy transfer to higher trophic levels within the aquatic ecosystem.