The thermal conductivities of mantle and core materials have a major impact on planetary evolution, but their experimental determination requires precise knowledge of sample thickness at high pressure. Despite its importance, thickness in most diamond anvil cell (DAC) experiments is not measured but inferred from equations of state, assuming isotropic contraction upon compression or assuming isotropic expansion upon decompression. Here we provide evidence that in DAC experiments both assumptions are invalid for a range of mechanically diverse materials (KCl, NaCl, Ar, MgO, silica glass, Al2O3). Upon compression, these samples are ∼30–50% thinner than expected from isotropic contraction. Most surprisingly, all the studied samples continue to thin upon decompression to 10–20 GPa. Our results partially explain some discrepancies among the highly controversial thermal conductivity values of iron at Earth's core conditions. More generally, we suggest that in situ characterization of sample geometry is essential for conductivity measurements at high pressure.