Based on the geometry of the codimension-2 surface in general spherically symmetric spacetime, we give a quasi-local definition of a photon sphere as well as a photon surface. This new definition is the generalization of the one provided by Claudel, Virbhadra, and Ellis but without referencing any umbilical hypersurface in the spacetime. The new definition effectively excludes the photon surface in spacetime without gravity. The application of the definition to the Lemaître–Tolman–Bondi (LTB) model of gravitational collapse reduces to a second order differential equation problem. We find that the energy balance on the boundary of the dust ball can provide one of the appropriate boundary conditions to this equation. Based on this crucial investigation, we find an analytic photon surface solution in the Oppenheimer– Snyder (OS) model and reasonable numerical solutions for the marginally bounded collapse in the LTB model. Interestingly, in the OS model, we find that the time difference between the occurrence of the photon surface and the event horizon is mainly determined by the total mass of the system but not the size or the strength of the gravitational field of the system.