The purpose of the paper is to introduce a new method for flexible storage of still images. The complete design of the system is described with the scalable encoding, the distortion computation, the bits allocation strategy, and the method for the memory management. The main improvement is the full exploitation of a perceptual metric to assess precisely the introduced distortion when removing a layer in a scalable coding stream. Experimental results are given and compared with a system which uses the PSNR as distortion metric.