Electronic functionalities in materials from silicon to transition metal oxides are, to a large extent, controlled by defects and their relative arrangement. Outstanding examples are the oxides of copper, where defect order is correlated with their high superconducting transition temperatures. The oxygen defect order can be highly inhomogeneous, even in optimal superconducting samples, which raises the question of the nature of the sample regions where the order does not exist but which nonetheless form the "glue" binding the ordered regions together. Here we use scanning X-ray microdiffraction (with a beam 300 nm in diameter) to show that for La 2 CuO 4þy , the glue regions contain incommensurate modulated local lattice distortions, whose spatial extent is most pronounced for the best superconducting samples. For an underdoped single crystal with mobile oxygen interstitials in the spacer La 2 O 2þy layers intercalated between the CuO 2 layers, the incommensurate modulated local lattice distortions form droplets anticorrelated with the ordered oxygen interstitials, and whose spatial extent is most pronounced for the best superconducting samples. In this simplest of high temperature superconductors, there are therefore not one, but two networks of ordered defects which can be tuned to achieve optimal superconductivity. For a given stoichiometry, the highest transition temperature is obtained when both the ordered oxygen and lattice defects form fractal patterns, as opposed to appearing in isolated spots. We speculate that the relationship between material complexity and superconducting transition temperature T c is actually underpinned by a fundamental relation between T c and the distribution of ordered defect networks supported by the materials. granular superconductors | multiband superconductivity in density wave metals | scale-free heterogeneity | imaging phase separation | X-ray illumination