In a lossy compression, the reconstructed image I' differs from the original image I. In different situations, different compressions lead to different quality reconstruction, so it is important to select, in each situation, the best compression method. It's natural to select the compression method for which the average value of some quality metric d(I,I') is the smallest. Which quality metric should we choose? We show that under reasonable symmetry conditions, L^p metrics d(I,I')=integral of |I(x)-I'(x)|^p are the best, and how to compute the optimal value of p from the expected relative size of the informative part of the image.