Superconductors show zero resistance to electric current, and expel magnetic flux (the Meissner effect) below the transition temperature (Tc). In conventional superconductors, the 'Cooper pairs' of electrons that are responsible for superconductivity form only below Tc. In the unconventional high-Tc superconductors, however, a strong electron correlation is essential for pair formation: there is evidence that some pairs are formed above Tc in samples that have less than the optimal density of charge carriers (underdoped) and an energy gap-the 'pseudogap'-appears to be present. Moreover, excitations that look like the vortices that carry magnetic flux inside the superconducting state have been reported above Tc (refs 6, 7). Although the origin of the pseudogap remains controversial, phase fluctuations above Tc, leading to some form of local superconductivity or local pairing, seem essential. Here we report magnetic imaging (scanning SQUID microscopy) of La2-xSrxCuO4 thin films. Clear quantized vortex patterns are visible below Tc (18-19 K), and we observe inhomogeneous magnetic domains that persist up to 80 K. We interpret the data as suggesting the existence of diamagnetic regions that are precursors to the Meissner state.