We present a new image compression method, for very high quality lossy compression. This method caters for image data in regimes of (i) detector imperfections, which motivates a robust approach based on the median transform, and (ii) noise, which is explicitly sought and separated out, since noise is inherently non-compressible. An in-depth assessment is carried out on real data, relative to the standard JPEG compression method. Comparable visual quality is based on 260:1 compression with the new method, and 40:1 compression with JPEG. The assessment procedure, based on the astronomical images used, is an objective approach for determining very high quality visual reconstructions.