In hydraulic fracturing, water is injected at high pressure to crack shale formations. More sustainable techniques use aqueous foams as injection fluids to reduce the water use and wastewater treatment of conventional hydrofractures. However, the physical mechanism of foam fracturing remains poorly understood, and this lack of understanding extends to other applications of compressible foams such as fire-fighting, energy storage, and enhanced oil recovery. Here we show that the injection of foam is much different from the injection of incompressible fluids and results in striking dynamics of fracture propagation that are tied to the compressibility of the foam. An understanding of bubble-scale dynamics is used to develop a model for macroscopic, compressible flow of the foam, from which a scaling law for the fracture length as a function of time is identified and exhibits excellent agreement with our experimental results.