The prompt emission of gamma-ray bursts probably comes from a highly relativistic wind which converts part of its kinetic energy into radiation via the formation of shocks within the wind itself. Such internal shocks can occur if the wind is generated with a highly non uniform distribution of the Lorentz factor. We estimate the expected photospheric emission of such a wind when it becomes transparent. We compare this thermal emission (temporal profile + spectrum) to the non-thermal emission produced by the internal shocks. In most cases, we predict a rather bright thermal emission that should already have been detected. This favors acceleration mechanisms for the wind where the initial energy input is under magnetic rather than thermal form. Such scenarios can produce thermal X-ray precursors comparable to those observed by GINGA and WATCH/GRANAT.