All-adaptive imaging of phase objects in focusing of spatially phase-modulated laser beams in an extended weakly absorbing liquid or a gas medium is realized. The required level of the system operation corresponds to the initial stage of thermal self-action of the illuminating laser beam. Imaging occurring in an extended weakly absorbing medium in a definite power range is a new effect in propagation of spatially phase-modulated laser beams. Imaging of objects in such schemes takes place in focusing of a spatially phase-modulated beam of an appropriate power directly on a real weakly absorbing atmosphere or an aqueous medium. Due to adaptivity of this nonlinear process in contrast to linear systems, imaging occurs under the conditions of heat flows, which leads to wandering of the laser beam waist as a whole in the Fourier plane.© (2010) COPYRIGHT SPIE--The International Society for Optical Engineering. Downloading of the abstract is permitted for personal use only.