In this paper, a genetic algorithm-based image compression technique using pattern classification is introduced. From one hand, the block pattern coding technique classifies image blocks into low-detailed and high-detailed blocks and codes the individual blocks according to their types. On the other hand, a genetic algorithm technique explores a given search space in parallel by means of iterative modification of a population of potenial solutions. The GA operation described here, searches for the optimal threshold(s) for the bi-level or multi level quantization of high detailed image blocks. Comparison of the results of the proposed method with the coding algorithms based on the two level minimum mean square error quantizer reveal that the former method can almost achieve optimal quantization with much less computation than required in the latter case.