The electrostatic potential distribution in two-dimensional electron gases has been imaged using the electro-optic effect. A potential drop over a length of about 100 mu m has been found. This edge potential drop runs along one sample edge only if either the source or the drain contact are at substrate potential.