Metabolism fuels all of life's activities, from biochemical reactions to ecological interactions. According to two intensely debated theories, body size affects metabolism via geometrical influences on the transport of resources and wastes. However, these theories differ crucially in whether the size dependence of metabolism is derived from material transport across external surfaces, or through internal resource-transport networks. We show that when body shape changes during growth, these models make opposing predictions. These models are tested using pelagic invertebrates, because these animals exhibit highly variable intraspecific scaling relationships for metabolic rate and body shape. Metabolic scaling slopes of diverse integument-breathing species were significantly positively correlated with degree of body flattening or elongation during ontogeny, as expected from surface area theory, but contradicting the negative correlations predicted by resource-transport network models. This finding explains strong deviations from predictions of widely adopted theory, and underpins a new explanation for mass-invariant metabolic scaling during ontogeny in animals and plants.