This paper presents a compression framework for light-field images. The main idea of our approach is exploiting the similarity across sub-aperture images extracted from light-field data to improve encoding performance. For this purpose we propose a variational optimisation approach to estimate the disparity map from light-field images and then apply it to a motion-compensated wavelet lifting scheme. Making use of JPEG2000 for coding all high-/low-pass sub-band views as well as disparity map, our approach can therefore support both lossless and lossy compression. The coding framework is tested with both synthetic and real-world light-field dataset. The experimental results demonstrate that our approach outperforms JPEG-LS and the direct application of JPEG2000 in both lossless and lossy compression scenarios.