The notion that the electromagnetic field is quantized is usually inferred from observations such as the photoelectric effect and the black-body spectrum. However accounts of the quantization of this field are usually mathematically motivated and begin by introducing a vector potential, followed by the imposition of a gauge that allows the manipulation of the solutions of Maxwell's equations into a form that is amenable for the machinery of canonical quantization. By contrast, here we quantize the electromagnetic field in a less mathematically and more physically motivated way. Starting from a direct description of what one sees in experiments, we show that the usual expressions of the electric and magnetic field observables follow from Heisenberg's equation of motion. In our treatment, there is no need to invoke the vector potential in a specific gauge and we avoid the commonly used notion of a fictitious cavity that applies boundary conditions to the field.