The Gabor expansion is studied for the purpose of image compression. First, the mathematical conditions required to obtain complete sets of Gabor functions in L2(R) are presented. The concept of Gabor expansion is further interpreted in terms of the compression of real digital images: the problems of both complete and partial Gabor expansions of images are stated and an optimization algorithm which provides the coefficients of these expansions is proposed. This iterative algorithm based on the conjugate gradient algorithm converges in a finite number of iterations and in the mean time it is not computationally too costly (O(n2) calculations per iteration). For complete expansions, a new and tight bound on the number of iterations required to achieve exact reconstructions is given. For partial expansions, the study shows that very good reconstructed images can be obtained with bit rates as low as 0.6 bit per pixel.