To date, computer science solves pattern recognition problems by highly task specific algorithms. Searching for a generic, unifying principle of pattern recognition, Benedetto et al. showed that compression is a good candidate: For the domain of text, approximating the mutual information of patterns by the achievable compression factors allows to detect similarity with surprising accuracy. Here we show that this principle is much more general than expected, since the common compressor gzip is able to solve a major computer vision problem, the classification of image categories. This result is remarkable for three reasons: Firstly, the applied compression programs were never designed for pattern recognition tasks of any kind; secondly, hardly any other method is able to deal with patterns as different as text and pixel images alike without any modification; thirdly, compression solves the entire task in a single step, without any data preprocessing, feature extraction or the need for parametrization. We will discuss the theoretical background of this finding and point out the role of compression in a yet to develop general theory of pattern recognition.