Magnetic resonance imaging (MRI) is well known in a clinical context as a technique capable of delivering highly detailed anatomical images, particularly of soft tissue. The MRI method is completely non-invasive and allows spatial resolution down to a few micrometres in three dimensions. Image contrast is governed by one of several nuclear magnetic resonance parameters and might reflect water mobility, chemical potential, self-diffusion coefficient, coherent flow or temperature, depending upon the exact form of the MRI measurement. Less widely realized is the enormous potential for the use of MRI in materials science. The flexibility that makes MRI such a valuable clinical tool is equally applicable in a nonmedical scenario, but the greater technical difficulties associated with MRI in solid materials have hitherto limited the development of the technique in this area. This review describes in detail one approach to MRI in solid materials which is currently benefiting from rapidly increasing application: stray field (magnetic resonance) imaging (STRAFI). An introduction to the phenomenon of nuclear magnetic resonance and particularly its detection in solids is followed by a description of the steps necessary for its use as an imaging modality. The limits of MRI spatial resolution in liquids and solids are briefly discussed. STRAFI is placed in context throughout this introduction. The STRAFI technique is then described in detail, in terms of its merits relative to other approaches to solids MRI and the subtleties of its implementation. The principal areas of current STRAFI application are reviewed and developments with which STRAFI advancement is closely linked, are also described. In conclusion, some consideration is given to the promising future of stray field MRI as a widely accepted research tool in materials science and to the development of the technique itself.