In the electrodeposition of metals, a widely used industrial technique, bubbles of gas generated near the cathode can adversely affect the quality of the metal coating. Here we use phase-contrast radiology with synchrotron radiation to witness directly and in real time the accumulation of zinc on hydrogen bubbles. This process explains the origin of the bubble-shaped defects that are common in electrodeposited coatings.