Liebig's law of the minimum, which states that only one element limits the growth of organisms at any given time, is widely used in ecology. This principle is routinely applied to organisms, populations and communities, but can it really be applied indistinguishably across these different scales? Here we show, by prediction of a resource ratio conceptual model and with an experimental test carried out in microcosms with bacteria that, unlike single species, communities are likely to adjust their stoichiometry to that of their resources. This adjustment results from competitive exclusion and coexistence mechanisms, and is sensitive to the overall diversity of species in the community. It guaranties co-limitation, i.e. simultaneous limitation by multiple resources, at the community scale and optimal use of resources and maximization of community biomass for wide ranges of resource ratios. These results question the applicability of the Liebig's law of the minimum at the community level, and the relevance of ecosystem models relying on this principle.