With many possible multimedia applications, content-based image retrieval (CBIR) has recently gained more interest for image management and web search. CBIR is a technique that utilizes the visual content of an image, to search for similar images in large-scale image databases, according to a user's concern. In image retrieval algorithms, retrieval is according to feature similarities with respect to the query, ignoring the similarities among images in database. To use the feature similarities information, this paper presents the k-means clustering algorithm to image retrieval system. This clustering algorithm optimizes the relevance results by firstly clustering the similar images in the database. In this paper, we are also implementing wavelet transform which demonstrates significant rough and precise filtering. We also apply the Euclidean distance metric and input a query image based on similarity features of which we can retrieve the output images. The results show that the proposed approach can greatly improve the efficiency and performances of image retrieval.